New answers tagged contract-invocation
0
votes
Interacting with one smart contract to another ? , Multiple smart contract interaction ? , One contract calls to another contract ? Solidity
Ok, So to solve this problem, Solidity not only provides for inheritance to invoke contracts in one another, It also provides a cool feature that helps devs/coders to invoke a contracts function from ...
0
votes
Pass a function as a parameter in Solidity
As noted in other answers, there are distinct answers to your question depending on whether you are talking about calling the function "externally" or calling it "internally."
...
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#...
0
votes
Sending eth with write function causing problems?
The way I've used it is to pass overrides to the write function:
const [{ data: writeData, error: writeError }, write] = useContractWrite(
{
addressOrName: 'Address',
contractInterface:...
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
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
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 ...
0
votes
NFT Sent to Smart Contract
I don't think that you can.
But that would have reverted if you would have used the safeTransferFrom function as this contract doesn't appear to implement the IERC721Receiver.
Did you used ...
0
votes
get array.length without a getter from other contract?
I recently had this issue and really needed to get the array length on an already deployed contract. And of course I didn't deploy some nice getCount() function.
Here's my really terrible, but working ...
0
votes
How to detect from web3 if method exists on a deployed contract?
yes, there is a way.
If the smart contract address owner have given the codes on its polyscan/etherescan, then you can get codes, they also provider API, so that you don't need to retrieve available ...
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 ...
0
votes
Contract A delegatecall function in contract B which calls function in contract c. msg.sender for function in contract c?
The msg.sender according to the test scenario below is Contract A
The Change to state happens in Contract A and Contract C
For me it make sense because contract B has nothing to do with the ...
0
votes
Accepted
How can I call a deployed smart contract on Kovan using Python?
Any smart contract call cannot change the Ethereum state.
You need to perform a transaction and pay the gas fee to make any state changes. There are no free state changes.
Use transact() instead of ...
Top 50 recent answers are included
Related Tags
contract-invocation × 1110contract-development × 342
solidity × 335
web3js × 183
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
erc-20 × 27
events × 27
nodejs × 26
ether × 25
web3.py × 20
calldata × 19