New answers tagged

0

You used the tags "solidity" and "contract-development" so I assume your question is from a code point of view. The smart contracts use a data structure called "mapping" to save data to the Blockchain. An exemple of mapping declaration in Solidity can be : mapping( address => uint256) userBalances; This is a kind of ...


1

It sounds like it goes: User => shared account, singleton => contract Now, it should probably be set up so the users don't actually hold the corporate signing credentials. Think about employee turnover and restricting the extent of what authorized employees can actually do. It will probably be best to validate what they are doing and keep in a narrow ...


0

The solidity version required by OpenZeppelin's contracts don't match the version configured in Truffle. Either you can upgrade Truffle to use solc v0.6, or downgrade OpenZeppelin to version 2.5 that uses solc v0.5. OpenZeppelin v3.0, v3.1 require solc v0.6 OpenZeppelin v2.5 require solc v0.5


1

I assume it's due to the gas limit you pass along. If you look at a successful transaction, it actually consumed 222,750 gas, so you need to adjust your limit or use the estimateGas function. One other thing that I noticed, be aware that using now inside your contract to use as deadline is a security risk. The deadline timestamp should be passed from the ...


0

You can create a smart contract on the blockchain that will be used to keep track of the hashes. Storing the hash is cheap as compared to storing data on ethereum. Transaction costs can be calculated using: Cost = Gas Cost * Estimated Gas Required You can use web3j functions to calculate the gas cost and estimated gas required to carry out the transaction. ...


0

The solution from Badr Bellaj worked for me but I had to specify contractInstance.method.myMethod instead of just contractInstance.myMethod. This made me looking for a solution for days although I tried this immidiatly after the error occured.


0

Simple answer : too difficult to be practical unless you know it follows a standard (hence can imply most of the ABI) Sometimes answer : you could query etherscan and similar services that could have the verified contract source. If they do, they also have the ABI available. https://etherscan.io/apis


Top 50 recent answers are included