web3

How to call a Smart Contract function using Python and web3.py

别等时光非礼了梦想. 提交于 2021-02-19 04:59:10
问题 I have a contract deployed on Ethereum test network which has some functions in it and they all happen to work while using the Remix interface. When trying to call those functions using web3.py in Python, I'm able to call only for public functions and that part works fine. The problem is calling a function with a "restriction" such as having an "owner requirement", meaning only the address which created the contract can call that specific function. I've Googled it but no luck. I'm guessing

How to listen for incoming transactions not yet mined for a single address?

丶灬走出姿态 提交于 2021-01-28 00:04:34
问题 Using OpenEthereum, which is the json rpc call allowing to do it? I found the parity_pubsub module but I ve no idea of the parameter for getting not yet confirmed transactions. I also found https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#subscribe-pendingtransactions in the web3 module but it doesn t allows to filter transactions and the documentation doesn t explains how to use the full web3 api along OpenEthereum. The purpose The aim is to frontrun transactions for

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

家住魔仙堡 提交于 2021-01-27 05:54:49
问题 I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error: Uncaught Error: Returned values aren't valid, did it run Out of Gas? at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters (index.js:227) at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeLog (index.js:277) Web3 version: 1.0.0-beta36 Metamask version: 4.16.0 How to fix it? 回答1: Try the

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

让人想犯罪 __ 提交于 2021-01-27 05:54:10
问题 I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error: Uncaught Error: Returned values aren't valid, did it run Out of Gas? at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters (index.js:227) at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeLog (index.js:277) Web3 version: 1.0.0-beta36 Metamask version: 4.16.0 How to fix it? 回答1: Try the

How to get event log Web3.py?

元气小坏坏 提交于 2020-12-13 03:37:50
问题 I am using solidity 0.7.4, web3.py 5.12.2, and python 3.7. I am working with Windows 10. My goal is to emit an event inside a solidity function, in order to retrieve the log after the function is executed. This is my event event logString(string arg); And this is how I emit the event emit logString("example string"); On Remix it works, and I am able to retrieve the string I emit, in the log of the transaction. When I try it on Python, it doesn't work. This is my Python code: web3_instance =

How to get event log Web3.py?

杀马特。学长 韩版系。学妹 提交于 2020-12-13 03:37:37
问题 I am using solidity 0.7.4, web3.py 5.12.2, and python 3.7. I am working with Windows 10. My goal is to emit an event inside a solidity function, in order to retrieve the log after the function is executed. This is my event event logString(string arg); And this is how I emit the event emit logString("example string"); On Remix it works, and I am able to retrieve the string I emit, in the log of the transaction. When I try it on Python, it doesn't work. This is my Python code: web3_instance =