2022 Developer Survey is open! Take survey.

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
0 answers
3 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
4 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
9 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
18 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
15 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
  • 1
0 votes
3 answers
19 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
21 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
18 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
12 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
  • 103
0 votes
0 answers
17 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
19 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
28 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
23 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
8 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
28 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
17 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
27 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
30 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
35 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
29 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
38 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
40 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
36 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
0 votes
0 answers
24 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
16 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
0 votes
0 answers
92 views

How can I read the unclaimed fees by Uniswap V3 liquidity providing through another smart contract?

I need to get a precise reading of the fees generated by a liquidity providing position I opened on Uniswap V3, and I need to get it on another smart contract (not on a frontend, so no use in ...
user avatar
0 votes
0 answers
15 views

How to simulate past transactions (contract calls) at different historical block numbers and block positions?

I was reading https://medium.com/coinmonks/the-defi-liquidation-game-aaef5c0b903d and am looking to perform some similar analysis. One of the methods I am confused by: "We can find the MEV ...
user avatar
0 votes
2 answers
63 views

General function to withdraw any ERC-20/ ERC-721 token sent to a contract

I am deploying a contract today. Tomorrow if some user mistakenly sends ETH to my contract, I can retrieve or return it if I have implemented a payable and a send function. @external @payable def ...
user avatar
0 votes
1 answer
19 views

Does a contract's constructor re-run every time it is called by an EOA?

Does a contract's constructor re-run every time it is called from an EOA or does the initialized state persist in the contract storage once it is created by the first msg.sender ? If the first ...
user avatar
0 votes
0 answers
12 views

How much does it cost to sell a smart contract made in solidity, how do I get this quote?

I would like to ask you something, let's say you were going to sell this smart contract so I developed in solidity a software that simulates an electronic voting machine, would someone know how to ...
user avatar
0 votes
0 answers
19 views

What are the pros and cons of storing contracts vs their addresses?

What are the pros and cons of storing a contract address in state and loading the contract using that address as required vs storing the contract/interface directly in state as shown below? ...
user avatar
  • 180
0 votes
0 answers
53 views

Does returned success condition for low level calls imply call reverted or not?

Can't find much info in the solidity docs (https://docs.soliditylang.org/en/v0.7.6/units-and-global-variables.html?highlight=call) pertaining to what the returned success condition of low level calls ...
user avatar
0 votes
1 answer
39 views

Cannot establish connection with mumbai testnet

I'm trying to call a function of my contract deployed on testnet mumbai but I can't get it working. Here's the code const ethers = require('ethers'); const addressOfContract = "...
user avatar
0 votes
1 answer
27 views

How to differentiate between topics and data in an event ABI?

I'm trying to recreate the ABI of an event function (that I don't have the ABI for). I have looked at event ABIs in other contracts of the same project and they all look like this: {"anonymous&...
user avatar
  • 113
0 votes
1 answer
42 views

how to use the value of msg.value and msg.sender of a contract, when a function calls a different contract

I'm studing Solidity and tring to understand how it works. Starting from Safe Remote Purchase in the "Solidity section by example" the doc (https://docs.soliditylang.org/en/v0.8.12/solidity-...
user avatar
  • 3
1 vote
0 answers
23 views

Is there a way to call a function via a selector from within a contract?

In the case of calling a function with signature foo(uint256) from contract A, I could use this construction in solidity: address(A).call(abi.encodeWithSignature("foo(uint256)", 100)); // or ...
user avatar
  • 147
0 votes
1 answer
37 views

Is there website that allows to interact with smart contract using only ABI in a generic way?

I have ABI for a contract but do not have source code. Is there any website or application which uses the ABI and deployed contract address to interact with the contract. I have tried myetherwallet ...
user avatar
  • 23
0 votes
0 answers
7 views

interface need help please

i want change balances from another contract but he dont working pragma solidity ^0.8.10; interface ICounter { function balanceOf(address owner) external view returns (uint); function ...
user avatar
  • 1
0 votes
0 answers
18 views

Revealing NFTs on ECR721 contract before sold out?

https://rinkeby.etherscan.io/address/0x59C78c4a2313964b5360bCe9644513Bb8e5ABC30 This is my eth test contract for my NFT project. I am struggling to figure out how to reveal the NFTs when they are not ...
user avatar
  • 1
0 votes
1 answer
88 views

Solidity contract doesn't see ERC20 token after first swap

I have a small Paraswap contract. All it does is make two low level calls to Paraswap to swap tokens and return back to sender. pragma solidity ^0.8.0; import "./IERC20.sol"; // from ...
user avatar
0 votes
0 answers
78 views

Can't call a deployed contract method

I am trying to connect to the Pangolin DEX (a Uniswap fork) on the Avalanche Fuji testnet (Avalance uses EVM). With this: import console from "console"; const ethers = require("ethers&...
user avatar
  • 101
1 vote
1 answer
128 views

A simple way to do a read a contract from a json file and interract with it using ethers.js?

I'm using hardhat and have deployed some contracts. That's created a directory deployments which containes meta data of the deployed smart contracts. Is it called artifacts? Now, via the library ...
user avatar
0 votes
0 answers
26 views

Contract function has been pending for too long

I made this call to my smart contract using remix: https://ropsten.etherscan.io/tx/0x9bcec02573db09054ac7bc00e5a7826b68ea8b0d929a6d07737ddfb1041ff887 When I try to make the call from my actual ...
user avatar
  • 101
0 votes
0 answers
16 views

delegatecall, but with modifying the Caller contract state?

Example: EOA -> Caller Contract -> Target Contract As far as I can tell, delegatecall differs from normal calls in two very important ways: Call context is preserved, msg.value and msg.sender ...
user avatar
0 votes
0 answers
10 views

Why no event data in transaction data if call from other contract, direct call is ok

The problem with event OnTargetRun emited in run() interface ITarget { event OnTargetRun(address sender,uint256); function run()external; } contract Target is ITarget{ uint256 public ...
user avatar
0 votes
0 answers
65 views

Problem returning tokenURI(string) from contract

I'm trying to return information from a contract, most specifically the tokenURI. My problem is that I cannot visualize the result... it seems to be empty when it was supposed to be a string. I must ...
user avatar
0 votes
1 answer
51 views

What does this decompiled NFT contract source code mean?

Decompiled the bytecode of a ERC-1155 contract using EtherScan, which gave the following result. It's fairly short, which is unexpected for an NFT, so line-by-line what does this code even mean, given ...
user avatar
0 votes
2 answers
136 views

User Whitelisting on Smart Contract

Say I have this smart contract that can be invoked only by a set of known users (a finite list of addresses). The obvious method to implement this logic is simply by keeping track of these addresses ...
user avatar
  • 105

1
2 3 4 5
23