New answers tagged

1

The callback function is executed when the Node sends the transaction hash back to your process. This typically happens almost immediately, and as such, it does not indicate that the transaction has been mined; you still need to take the transaction hash and use it in order to obtain the receipt; furthermore, you still need to take that receipt and wait for ...


0

In case anyone comes here looking for an answer, I've figured it out. I changed how I instance my contract. I create a separate js file to store an object with all the contract data; module.exports = { address: "(Your-Contract-Address-Goes_here)", abi: [ { (Your-Contract-ABI-goes-here) } ] } then to create the instance, I get Web3 and ...


2

Yes! This pattern of transactions is called metatransactions. As you described, your user would sign the transaction, but you would send the transaction to the network via a metatransaction. There are a number of different ways to implement it. The Gas Station Network (GSN) by OpenZeppelin provides this as a service and is worth considering for your use.


0

You are trying to pass Javascript object as Ethereum address, while it should be Javascript string. The problem is most probably in the following line: from: this.contract It should be something like this: from: this.contract.address to avoid the error. However, there is another, even more serious problem with your approach: in order to send ...


2

Since solidity 0.5 keccak256 is expecting bytes as input and you are passing an uint. You can use abi.encodePacked to convert an arbitrary input to bytes. keccak256(abi.encodePacked( (rw() / (10**20) ) % (10**12) ) )


Top 50 recent answers are included