1
vote
Accepted
Error calling collaborator contract
you are not far from the answer, check your
testContract.setDependency(testDependency);
to be replaced with
await testContract.setDependency(testDependency.address);
1
vote
How to call a contract's method via web3 1.x without a node (sign with a privateKey and send)?
Assuming you have a proper Web3 instance setup, the below is how I generally make contract calls from the server using a class (or where you have a fixed key that requires no user input). I use an ...
1
vote
Accepted
Can external solidity functions get called within the same contract dynamically?
Is it a valid call or we need to add public modifier to mooz ?
It is a valid call, but it's a strange usecase though.
You do not need to add public and in fact, you can't. It would trigger a compiler ...
1
vote
How does a single getter call get chosen by a node if there's no reward associated?
Only transactions are distributed to the miners to be executed.
The calls to view functions are executed by the web3 provider. If you run your own node the query will be executed locally, if you use a ...
1
vote
How to get value of a contract public property using web3.eth
None of the other answers work for me. This does:
import Web3 from "web3";
const address = "0xe9e7...";
const abi = "[{...";
const web3 = new Web3(); // pass your ...
1
vote
Pass a function as a parameter in Solidity
For anyone coming from google looking for a quick example of how to pass a function as a parameter, check out the following code excerpt (source https://docs.soliditylang.org/en/latest/types.html#...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
contract-invocation × 1114contract-development × 343
solidity × 338
web3js × 184
contract-design × 176
transactions × 115
contract-deployment × 105
go-ethereum × 87
contract-debugging × 67
gas × 54
remix × 52
truffle × 43
tokens × 38
abi × 33
javascript × 30
evm × 30
blockchain × 29
metamask × 29
addresses × 29
events × 28
erc-20 × 27
nodejs × 26
ether × 25
web3.py × 20
etherscan × 19