Questions tagged [contract-invocation]

Questions regarding the act of calling or interacting with (a.k.a. invoking) a contract on the Ethereum blockchain by a user or another contract on the blockchain. Includes both local invocation by call and global invocation by transaction.

Filter by
Sorted by
Tagged with
0 votes
1 answer
8 views

Gas allowance geth

I have deployed an Ethereum private network PoA with geth connecting 3 nodes: 2 nodes in aws EC2 instances and my own laptop. My purpose is to store strings in the network, so therefore, i have ...
user avatar
1 vote
1 answer
10 views

Cannot invoke contract function from console using truffle

I am working my through the book Ethereum for Dummies, and have created a contract HelloWorld, deployed to the blockchain and all is good until I try to invoke the function of the contract. My ...
user avatar
  • 11
0 votes
1 answer
24 views

Calling a function with multiple arguments in ethers returns Error: missing argument

I'm changing a part of front-end for my dApp from using Moralis to using ethers.js. For some reason I cannot get my head around on how to provide multiple arguments for the function call in a correct ...
user avatar
0 votes
0 answers
13 views

Cheapest way to call contract

I just looked into the DSProxy contract, and now I'm trying to figure out how to make an external contract call (call contract2 from contract1) as cheap as possible. The usual way ofc is: address ...
user avatar
0 votes
0 answers
5 views

Can call run instructions that operate on state?

Can the call RPC method operate on transactions that have instructions which modify the state? For example, how does a call work for the following? Would a node run setAndDouble in an isolated ...
user avatar
1 vote
1 answer
47 views

Why are all ethersjs & web3js calls to BSC network failing?

All calls using "wss://bsc-ws-node.nariox.org:443" and other RPC/WSS endpoints have been failing throughout this week. It just hangs and doesn’t return anything. This is happening in BSC ...
user avatar
  • 13
0 votes
1 answer
37 views

How to return an array when calling a solidity function?

Yo I'm pretty new to coding so bear with me. I'm using ReactJS with web3 to call functions from a smart contract but the function I'm trying to call returns an array and I can't figure out how to ...
user avatar
  • 3
0 votes
0 answers
8 views

I Want to See a Token Contract's Functions

For example, I want to see Truefeedback(TFBX) token's contract functions or maybe that contract's values. Is the code I wrote not true? What am i doing with this code actually? // SPDX-License-...
user avatar
  • 13
0 votes
0 answers
20 views

Does transferring funds from a contract to an unclaimed address create a new account?

I sent funds to some addresses via a proxy contract and later couldn't find those addresses on a block explorer. Sending directly from metamask to one of those addresses did reveal the address on the ...
user avatar
  • 111
0 votes
1 answer
19 views

How does one deploy Gnosis safe on a custom subnet EVM

I am currently creating documentation for my organization regarding deploying a gnosis-safe on a custom EVM. I'm having difficulty with interacting with the safe once it's deployed and would like some ...
user avatar
  • 1
1 vote
0 answers
29 views

How to call a Smart Contract function using php

I am trying to call a simple function (no parameters) from a Smart Contract currently on the Rinkeby network using php. I have an ubuntu 22.04 server with Apache, I installed composer and the ethereum-...
user avatar
0 votes
0 answers
15 views

Ethers.js returning Unhandled Rejection (Error): 'args.method' must be a non-empty string

I am attempting to write a generic service for my smart contract function executions. For some reason that I cannot figure out the calling of this function is producing the error: Unhandled Rejection ...
user avatar
  • 1
0 votes
1 answer
30 views

Execute "setApprovalForAll" on behalf of deployed smart contract (Solidity)

I have deployed a contract which implements Ownable and IERC721Receiver. The issue I am facing is that this particular contract does not implement any function to grant approval to other contracts in ...
user avatar
0 votes
0 answers
11 views

Eror: No conract loaded on target address

I am a total noob when it comes to any of this stuff so bear with me. I am running a local RPC node for minting NFTs with a bot. I got everything setup with Geth and the node running, but when I try ...
user avatar
1 vote
1 answer
40 views

Executing on-chain functions using react moralis

I'm trying to convert my dapp from vanilla js + html (local hardhat node) to react-moralis + nextJS (local hardhat node). Here is an example of a contract function call from the front-end. This code ...
user avatar
0 votes
0 answers
7 views

Calldata in intra-contract calls

How does calldata work for calls between contracts on Ethereum? I was under the impression that it is the data sent in the original transaction that starts the execution, however it is possible for a ...
user avatar
0 votes
1 answer
34 views

Contract has callable functions not in ABI or source code

I've found several contracts for which I am able to call functions on the contract's front-end but that exist in neither the contract source code nor ABI. When I call the functions, ftmscan (an analog ...
user avatar
  • 35
0 votes
1 answer
102 views

Local hardhat node throws "Error: Transaction reverted" in the terminal for transactions that pass successfully

I'm developing a UI for my contract using a local hardhat node with an ethers library. I have several different contract function calls that pass successfully and do not throw any errors in browser ...
user avatar
0 votes
1 answer
34 views

Sending an argument with an ethers contract object

I'm trying to interface with my tested (in Remix) and working contract in a browser now but cannot understand how to send additional arguments with a payable function. I need to pass an argument ...
user avatar
0 votes
2 answers
24 views

How to derive method signature giving methodId and contract sourcecode?

When calling a method on a smartcontract, the first 4 bytes of input-data encompass the methodId. For instance the methodId 0xa9059cbb (4 bytes => 8 hex characters) is the hash of the well-known ...
user avatar
  • 113
0 votes
0 answers
33 views

How to send Wei with function call

I have a token mint function that is setup the following way struct HachiTicket { address to; uint256[] amounts; bytes32[] merkleProof; bytes signature; } ...
user avatar
0 votes
0 answers
23 views

can we transfer custom token from one contract function to another contract?

can we transfer custom token from one contract function to another contract ? I want to transfer some custom tokens to another contract whilst using a contract function. Is this possible ? e.g: ...
user avatar
0 votes
1 answer
21 views

Interact with "Solidity by Example" contract /

I'm having issues on interacting with the smart contract "Remote Purchase" specified in the official solidity documentation. https://docs.soliditylang.org/en/v0.8.14/solidity-by-example.html#...
user avatar
  • 1
0 votes
1 answer
11 views

How to get the contract binary using web3.py?

I am using web3.py and I want to get the binary (not the ABI) of a smart contract, given its address. Is it possible? If yes, how? If it isn't possible using web3.py, is there an alternative Python ...
user avatar
0 votes
0 answers
4 views

Subscription pass for wallet

Instead of giving subscriptions to a website out as a credit card payment, how would one go about programming a subscription pass that recognizes a connected ethereum wallet as being a subscriber and ...
user avatar
0 votes
0 answers
6 views

Can Data of TX With Contract Be Tracked If No Event Is Emitted?

Given I interact with a smart contract and provide data. All transactions on the blockchain are recorded, but is unindexed data which is never emitted as event also readable to all (e.g. on scanners)? ...
user avatar
  • 11
0 votes
0 answers
14 views

Contract Calls returning null using truffle Gnache and node

i have a simple contract pragma solidity ^0.4.18; contract HelloWorld { string private name = "Ire"; function getName() public view returns (string) { return name; } function setName(...
user avatar
0 votes
1 answer
69 views

Error calling collaborator contract

I get the following error when a contract is invoking another injected contract: Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="...
user avatar
  • 105
0 votes
0 answers
29 views

0x fillQuote fails on mainnet fork. i am sending a delegate call (i want to save transaction context) to the 0x proxy contract but transactions fail

function fillQuote( // The `sellTokenAddress` field from the API response. IERC20 sellToken, // The `buyTokenAddress` field from the API response. IERC20 buyToken, // The `...
user avatar
  • 11
0 votes
3 answers
61 views

can we call constructor in another function of the same contract in solidity?

can we call constructor in another function of the same contract in solidity ? Curious, Kindly reply asap. Thanks
user avatar
0 votes
1 answer
34 views

Interacting with one smart contract to another ? , Multiple smart contract interaction ? , One contract calls to another contract ? Solidity

Interacting with one smart contract to another ? , Multiple smart contract interaction ? , One contract calls to another contract ? in Solidity. My questions are: How does a contract with each other ...
user avatar
0 votes
1 answer
185 views

How to call a contract's method via web3 1.x without a node (sign with a privateKey and send)?

There's a number of questions and answers about calling contract methods via web3, but they are either outdated (i.e. for web3 0.x while 1.x has many breaking changes) and/or don't include signing (1, ...
user avatar
  • 111
0 votes
0 answers
18 views

How to auto-buy from arweave blockchain on payable called?

So I have a wallet in Eth E and arweave A and a smart contract that knows both wallet addresses. I am developing is minting NFTs. When a new NFTis minted its contents are stored on arweave chain. How ...
user avatar
  • 53
0 votes
0 answers
32 views

What should be the correct way to access the function I am calling?

I want to create an auction for every item. So I am using this setup function createAuction() public { Auction newAuction = new Auction("arguments here"); auctions.push(...
user avatar
0 votes
1 answer
31 views

NFT Sent to Smart Contract

https://etherscan.io/address/0x23581767a106ae21c074b2276D25e5C3e136a68b#code Had a pretty big oopsy. I know. No one is kicking myself more than me. That being said, was curious if anyone saw a ...
user avatar
  • 1
1 vote
1 answer
157 views

Can external solidity functions get called within the same contract dynamically?

Assume we have the following solidity contract: contract khiar { function mooz(uint size) external { // do something with mooz! } function bademjoon(uint size) external { /...
user avatar
0 votes
0 answers
54 views

Importing: Identifier not found or not unique

Practicing to import some simple contracts from 2 other files ERC20_STD and NewGameOwner As you can see when I inherit from both contract NewGame is ERC20_STD, NewGameOwner{} VSC flags NewGameOwner ...
user avatar
  • 107
0 votes
0 answers
16 views

Interacting with Markets Tomb Pool (Rari) Contract to display balance in Python

I am looking to interact with the Markets (xyz) Tomb Pool (0) to identify the current balance and the available liquidity in the market (so I can subsequently withdraw my funds). This is the code I ...
user avatar
0 votes
1 answer
29 views

How does a single getter call get chosen by a node if there's no reward associated?

A tx uses gas to incentivize being picked up by a node. On the other hand, a getter doesn't. It just returns the value. How does a single getter call get chosen by a node if there's no reward ...
user avatar
  • 21
0 votes
0 answers
18 views

Parameters not sent to contract from interface

I have 3 contracts: Contract A that is erc721 COntract B that is a contract a factory Conntract c that is like a marketplace // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./...
user avatar
1 vote
1 answer
54 views

Contract A delegatecall function in contract B which calls function in contract c. msg.sender for function in contract c?

If Function in contract A delegatecall function in contract B which calls function in contract C. What will be the msg.sender for function in contract C?
user avatar
1 vote
1 answer
90 views

How can I call a deployed smart contract on Kovan using Python?

The smart contract was written and deployed on Kovan using Remix IDE and injected Metamask Kovan test network account. However, I'll need python to deal with large input of a function in the smart ...
user avatar
0 votes
0 answers
14 views

Hello I want to be done

there is a question when adding gas fee to my cryptocurrency, I want to distribute coin gas fee to holders of nft (my project), how is it possible in solidity, can you help me, thank you My naime jeff
user avatar
  • 13
1 vote
1 answer
215 views

Sending eth with write function causing problems?

I have a payable write function which accepts arguments and some ETH to perform the work. However, when calling the write function, the call is just transferring eth to the contract address without ...
user avatar
0 votes
3 answers
42 views

call a view function from a L1 contract in a L2 contract

I'm wondering is there a way to read a view function that is deployed on L1(Ethereum) on L2(e.g. Optimism) and vice-versa pragma solidity ^0.8.0; // pretend this is on L1 contract L1_contract { ...
user avatar
1 vote
0 answers
79 views

web3js FeeMarketEIP1559Transaction contract execution from nodeJS

got a contract on ropsten network https://ropsten.etherscan.io/address/0xa3b09a2e90ca5c97daf3846b3b9c86f1cebc9260, which is basically a copy of Hikari NFT smart contract. I'm able to call it directly ...
user avatar
0 votes
1 answer
93 views

how to remove tokens from contract?

i copied and pasted code to make a bep20 crypto coin. some of the coin is sent to the contract on each transaction. i want to remove the coin from the contract and put the coins in my wallet. i ...
user avatar
  • 1
0 votes
1 answer
83 views

Insufficient funds whie sending transaction to contract, even if balance is big enough

I'm trying to send a transaction in order to call a minting function of a smart contract on the Rinkeby Testnet. The problem is that I get the following error: Error: Transaction has been reverted by ...
user avatar
1 vote
0 answers
50 views

Using an external contract, how can you make it call a function on a target contract that requires a signature?

I'm trying to create a contract that calls the following mintNFT function but one of the parameters it needs is a signature: function mintNFT(uint256 _numOfTokens, bytes memory _signature) public ...
user avatar
1 vote
1 answer
19 views

Access contract using instance vs Interface

Assume I have deployed ContractA and want to call the function updateX. I can use create an instance of the ContractA or I can use an interface. When you use which one? Both updateXFromB and ...
user avatar

1
2 3 4 5
23