以太坊

web3.py开发之坑

2018-09-23  本文已影响563人  空即是色即是色即是空
# Execute smart contract function in the EVM without sending any transaction
myContract.functions.myFunction([param1]).call(options[])

# Will send a transaction to the smart contract and execute its function
myContract.functions.myFunction([param1]).transact(options[])

call不改变合约状态,read only;transact可能会改变合约状态,R&W

myContract.functions.name().call({"gasLimit":100000})
geth --datadir data --syncmode fast --rpcapi eth,web3,personal --rpc --cache=2048  console 2>>test.log
> eth.blockNumber
> 0
> eth.getBlock("latest")
> ...
上一篇 下一篇

猜你喜欢

热点阅读