Questions tagged [populus]

questions about the populus framework

1
vote
2answers
156 views

Populus: Contract fails due to solidity gas limit

platform darwin -- Python 2.7.12, pytest-3.0.2, py-1.4.31, pluggy-0.3.1 plugins: populus==2.0.1 OS: Mac OS X I believe I face with this error due to Solidity compiler's default gas limit that is 3,...
1
vote
1answer
884 views

Ethereum: How to use ERC20 token in python project?

I'm gonna develop python project for ehtereum using populus framework. In my project, I also planed to use ERC20 token. In fact, I didn't select any library and framework for my project. Can anyone ...
0
votes
1answer
178 views

Python3, Populus installed but not working, deprecation

Populus was functioning well until I began getting deprecation warnings. So I did pip uninstall populus and then pip3 install populus. Also installed all required python3 libraries. The install worked ...
4
votes
2answers
224 views

While using populus on pytest how could I transfer byte array as an input to the smart-contract like in solidity browser?

I have following contract; I can call set()with following byte array on solidity browser. The smart contract accepts the input as bytes32. I assume if geth and solidity browser sees a string starting ...
1
vote
1answer
108 views

How to launch test with Viper?

I would like to switch the smart contract compiler from Solidity to Viper. I'm following the Viper support page found in Populus documentation. This is what I get at the final step: Mac:tutorial ...
0
votes
1answer
30 views

“populus chain new horton” command doesn't work

I encounter my first serious issue with the populus tutorial when I try to execute the following command: populus chain new horton The output is: Mac:tutorial admin$ populus chain new horton ...
0
votes
1answer
86 views

Populus Unittesting: How to test a contract's fallback function?

How can I test the invocation of the fallback function by an external account of a contract using the Populus framework? For example, this runs forever: chain.wait.for_receipt(mycontract.transact({'...
2
votes
0answers
47 views

Adding default accounts with ETH in populus?

I'm thumbing through populus docs, and I don't see anything about adding additional default accounts preloaded with ETH into the test chain? I see I can set defaultAccount and/or web3.eth.coinbase, ...
3
votes
1answer
455 views

How to store negative values inside {8||16||32} bits in populus?

I want to store -1 in smallest memory such as in {8||16||32} bits instead of 256 bits. int i = -1; When I return var, it returns -1L instead of -1. I have assigned -1 into a int8 variable. As I ...
2
votes
2answers
372 views

blockHash compression problem inside a contract, block.blockhash(blockNumber) returns “0x” or random hash value

Related to following answer: function block_hash_validation(uint blockNumber, bytes32 blockHash) constant returns(bool isValid) { return (block.blockhash(blockNumber) == blockHash); } When ...
1
vote
1answer
316 views

populus: How to have multiple transactions in a single block?

My goal is to write a test case to simulate my contract inside populus. I observe that each transaction()(even it is a empty function call) will increment block number as one no matter what. [Q] As ...
1
vote
1answer
73 views

How could I return 'gasUsed' inside populus?

I am using populus to experiment my contract. I want to return only gasUsed for my transaction but it returns complete summary of the transaction. [Q] How could I obtain only gasUsed value or should ...
2
votes
1answer
183 views

On Populus I am unable to make Basic Testing (Greeter Contract) work due to py.test

I was not able to make the following Basic Testing example work on populus. platform darwin -- Python 2.7.10, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 rootdir: /Users/avatar/populus, inifile: plugins: ...
3
votes
1answer
1k views

How to call imported Contract using Solidity?

Inside my contract I want to use importkeyword to load other contracts and libraries to make my code more clean. As an example, I carried DateTime.sol contract to another file and import it inside ...
2
votes
0answers
134 views

Populus cannot deploy contract related to estimated gas is not enough error

I am using populus. Platform darwin -- Python 2.7.12, pytest-3.0.2, py-1.4.31, pluggy-0.3.1 Plugins: populus-1.1.0 OS: Mac OS X I do face with following error: for the following line on my test.py ...
4
votes
2answers
296 views

How do I make Populus talk to a node on Infura?

I signed up for Infura and they gave me a URL for a node to talk to, like https://ropsten.infura.io/mytokenjsifejsij39kdjkjfdk. (The part beginning mytoken isn't my real token.) I'd like to deploy ...
3
votes
3answers
4k views

populus OSError: [Errno 2] No such file or directory

When trying: $populus compile Get: OSError: [Errno 2] No such file or directory Tried: Tried to install missing dependencies as described here and installed solidity compiler as well - same ...
2
votes
1answer
261 views

populus : how do i deploy a contract with args in the constructor?

Suppose I have a contract with some parameters that can be passed in the constructor, how am I suppose to pass them within the framework ? I tried to search the docs at the deploy part but can't find ...