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
1answer
17 views

In MetaMask (web3.js 0.20.x) how to get events happened during a transaction?

In MetaMask (web3.js 0.20.7) I send a contract method with .sendTransaction(). Now I need to check the values of arguments of UpdateItem event created by this contract during the call of this method. ...
0
votes
1answer
21 views

Display top referrer number

I am developing an ETH game with a referral structure. Each account that exists in the game has a "Referral Count" associated with it that updates as people sign up using their referral link....
3
votes
1answer
29 views

Web3js shows Contract Address as null after deployment

I am using web3.js to deploy a contract. I am also using Ganache to mock the network and visualise the accounts. When the code below executes, the contract gets created, and Ganache shows a successful ...
0
votes
1answer
20 views

My contract is deployed but instance is undefined

I have deployed a contract on the ganache blockchain successfully using truffle. In the truffle console, I can call the contract fine truffle(development)> MyCoin [Function: TruffleContract] { ...
0
votes
1answer
28 views

How can I make an off-chain call to get the data stored at a specific storage slot on-chain? [duplicate]

I want to get data from on-chain that is not explicitly available through a getter. For example, if I know that there is data at position ...
0
votes
0answers
16 views

Why is Smart Contract call() method returning NULL in Ethereum Private Blockchain

This is where I am calling the contract function certify_find (hash, callback) { contract.methods.findDocHash(hash).call( function (error, result) { if (error) { console.log("Returned ERROR ...
1
vote
1answer
26 views

How do I find the ABI/JSON Interface for an ETH/ERC20 contract?

I sent TUSD to my Bittrex holdings to trade for other coins, but it never went into my account with Bittrex. They claim that I sent it to the wrong address. I am trying to recover these tokens so that ...
0
votes
0answers
6 views

How to list sub calls of conctract methods transferring money?

Assuming I have a contract method which conducts several money transfers, e.g. function payalot(address payable p1, address payable p2, address payable p3) public { p1.transfer(42); p2....
1
vote
1answer
22 views

How to deploy smart contract so that average user can interact with its public functions?

I sucesfully wrote and deployed smart contract using Remix and Metask to generate hashes used as keys. This contract has few payable public functions that set or get some numbers. After deploying ...
1
vote
1answer
29 views

Accessing contract functions from web3 and javascript

I have deployed a contract in a private blockchain using remix and ganache. Now I want to interact with it trough web3 and the console from my browser, but I'm not managing to interact with the ...
2
votes
1answer
38 views

Regular address turns into a contract after receiving a transfer?

To accept payments in ether myself, I first tried how others have implemented it. So I bought an item in a store that uses Coinbase Commerce to accept crypto payments and paid for my item with ether. ...
0
votes
2answers
50 views

Transactions not happening in Ropsten Test Network

I'm learning to set up a simple front-end website that executes smart contract methods in a testing environment, but even though MetaMask confirms the deployment of the contract, the transaction is ...
0
votes
1answer
20 views

Nethereum C# FilterInput.GetAllChanges always empty

I use Nethereum in my project to get all pending transactions on a specific smartcontract address. To do that based on the existing docs and Nethereum playground I try the following: private async ...
1
vote
1answer
96 views

How do you know if a contract is destroyed?

I'm using web3.py to interact with contracts. I was wondering, after calling a function with selfdestruct or suicide(address), how do I find out that the contract is in fact dead?
0
votes
1answer
13 views

Where is the contract deployed when created with factory contract

I am new to ethereum. I am trying to create a contract from a factory contract, which works fine and even returns the address of the newly created contract Contract FactoryContract { event ...
0
votes
1answer
27 views

How to search for a dapp based on its address?

There are many websites that track dapps like http://dappradar.com or https://www.dapp.com. Unlike Etherscan one particular dapp doesn’t have to be registered on such specific website in order to be ...
1
vote
1answer
23 views

Can you activate Contract Functions just by receiving Ether alone?

Noob Question here. I have a Dapp that has no actual need of a web interface. What is the best way to activate functions if someone did something as simple as send Ether to an address it controls from ...
1
vote
1answer
26 views

getEthToTokenInputPrice miner hack?

Plan to use getEthToTokenInputPrice in a Dapp. I was going to just use a larger sample size spread out over a large time period to mitigate flash loan price manipulation. Someone said this was ...
1
vote
1answer
68 views

ENS on Rinkeby - Network does not support ENS?

I was able to register the ENS domain on Rinkeby, as the network supports ENS. My TX: https://rinkeby.etherscan.io/tx/0xd42b64ab03387d7ca405e7ba7b85ce893444a141e7a7de174f0361e2c4231674 My subdomain: ...
0
votes
0answers
30 views

How can I debug EventLog in Solidity code? Multisig execution failure when executing multisend function

I'm trying to execute a multitransfer (ERC20token) transaction using a multisig contract. The multitransfer got executed successfully when the value of the token is 0, however it always fail (reverted)...
2
votes
0answers
41 views

How to know the reason of transaction's reversion in parity?

I am testing ERC20 USDT contract locally with parity. I imported contract to my private testnet and manually generated raw transaction that calls "transfer" method of contract. I send it to the node ...
0
votes
0answers
15 views

How is contract code executed in Vyper?

I'm trying to execute my first contract on Ethereum. I've been able to compile and deploy one of Vyper's test examples of an auction. I believe the contract is executed when a transaction is sent to ...
0
votes
1answer
32 views

invalid tuple value (coderType=“tuple”, value=1) error while calling a contract function

My contract code is as follows: pragma solidity >= 0.5.0 < 0.7.0; contract StoreData { address public owner; constructor () public { owner = msg.sender; } ...
0
votes
1answer
19 views

Can you force your smart contract to only process transactions in separate blocks

I am working on a smart contract and trying to come up with ways through which I can make sure that each transaction sent to my Ethereum smart contract is only processed as part of separate block, ...
0
votes
1answer
93 views

Error: This contract object doesn't have address set yet, please set an address first

I should click on a button in HTML such that by the clicking a smart contract must be deployed and its function must be run. But when i write the codes of the both operations in Node-js the followed ...
0
votes
1answer
38 views

Which is the best way to interact between smart contracts for complex scenarios (solidity 0.6)?

I'm learning about Solidity. I would like to write a complex scenario of demo to test the power of Solidity and smart contracts. My doubts are about interaction between smart contracts. If there ...
1
vote
1answer
28 views

How to find the source code of my contract which is not yet verified

I had created a token using eth based blockchain via remix.ethereum.org But I need to verify the source code ,but I am not having the backup copy of source code How can I see the source code of the ...
0
votes
0answers
66 views

Why error 'Fail with error 'Storage: Unpermissioned operator <0xc3d5d60630bc63eb1a07228cc5028cada1cc4c7b>' arises?

I wants to deposit & withdrawal DAI (https://kovan.etherscan.io/address/0xc4375b7de8af5a38a93548eb8453a498222c4ff2) to SOLO Margin(dydx) smart Contract at Kovan testnet (https://kovan.etherscan....
1
vote
2answers
36 views

How do I make my smart contract available for interaction with Metamask?

I am using OpenZeppelin starter kit. I wrote a smart contract that simply contains two integers which can be called. I compiled and deployed the smart contract to my local Ganache blockchain. I have ...
1
vote
0answers
32 views

geth is returning call trace but does not count balance change

I send this command to my geth (I'm sure anyone's Geth would return the same): curl host:8545 -X POST --header 'Content-type: application/json' --data '{"jsonrpc":"2.0", "method":"...
1
vote
0answers
18 views

Ropsten network contract method call not executing

I have function I'd like to execute onto the ropsten blockchain. I expect my metamask account to update balances however I just get this following output back <Function Method(uint256,bytes32) ...
1
vote
1answer
47 views

Is it possible to transfer token from other address if I have private key from it?

I know that if someone owns tokens he can simply call transfer method of contract to send money. I also know that for ERC20 contract owner of tokens can call approve for my account, and then I can ...
1
vote
1answer
23 views

How keccak hashing and for loop happening in pure function?

I put a keccak hashing inside pure function, it works and return me the result.It also works in a for loop. I studied that hashing the data and loop consumes consider amount of gas. Do we need to ...
1
vote
2answers
35 views

Very confused by the Contract API

TL;DR I'm very confused by the Contract API in web3: https://web3js.readthedocs.io/en/v1.2.6/web3-eth-contract.html myContract.methods not available in geth console either with Geth 1.9.11-stable and ...
0
votes
1answer
205 views

Getting “ReferenceError: unescape is not defined” when trying to call() a smart contract method from rasberry pi to a private geth network

> var contract1 = eth.contract(abi).at(address) undefined > contract1 { abi: [{.....] transactionHash: null, addRecord: function(), allEvents: function(), getPatientName: function(), ...
0
votes
0answers
18 views

Integration of (closed) cloud solution with Ethereum

I'm trying to invoke a smart contract function from a cloud solution Unfortunately I can only use REST web services and I cannot - install node.js - install any custom module Also, I can only use a ...
0
votes
0answers
22 views

Solidity - can I predict reverts?

I have a voting system and admin groups contracts. Each admin group (it contains array of addresses allowed to vote) can grab a voting contract and vote for changing code in my contracts environment. ...
0
votes
0answers
13 views

How can I retrieve the ETH stored in the contract for a now invalid ENS domain name?

A couple years ago, I bid on a domain name through the Ethereum Name Service (ENS) that is not valid, as it is considered a subdomain. For example, something like "apple.uk.eth" which should not be ...
0
votes
0answers
44 views

Gas required exceedes allowance when invoking a pure function

So, I got a problem when interacting with a smart contract in geth. I have this very simple contract: pragma solidity^0.6.1; contract Simple{ uint256 public number = 1; constructor() public { ...
1
vote
2answers
48 views

Token Sale Smart Contract

I am new to Ethereium Block Chain and have been trying some code written in solidity as follows. pragma solidity ^0.5.0; import "./MyERC20Token.sol"; import "./ERC20Burnable.sol"; contract ...
0
votes
1answer
24 views

Trouble deploying one contract from another

Why creating a contract new RewardCourts() in another contract takes more than ten kilobytes of bytecode in the contract it is called from? (It makes bytecode too big and I can't deploy it!) What to ...
0
votes
0answers
25 views

Gas Estimation Failed error when scheduling Aion call

I am trying to understand the Aion scheduling system, so I tried their code example from here. Below is the code snippet: pragma solidity ^0.4.24; // interface Aion contract Aion { uint256 ...
1
vote
2answers
203 views

How to withdraw DAI from DSR (Oasis Saving Dapp / MakerDao) using the contract only, not the Dapp frontend?

I am currently testing the Oasis Saving Dapp by MakerDao (https://oasis.app/save). After converting some DAI to DSR, users can earn savings and whenever they want, withdraw their funds (convert back ...
1
vote
3answers
56 views

How to call function from SmartContract?

I have a smart contract deployed having the following function. function getTime() public view returns (uint){ return now; } However, when I try to call the function like this. ("einstance"...
0
votes
3answers
48 views

If I use a factory contract to create a new contract, does it show that the factory contract created it in the blockchain? [closed]

I am not sure if it would show my address or the factory contract's address (or both).
1
vote
1answer
53 views

web3py - Sending a transaction to a payable contract function

I have deployed a smart contract dthat contains a payable function fundit(address _to). Now I am trying to use a Contract object to send ether to the function: tx_hash = instance.fundit....
2
votes
1answer
65 views

Execute transaction Approve directly against contract address (without ABI)

Solved For now, you will always need the ABI to execute a call against the ethereum network with web3. A simple way is to reconstruct the function you wish to execute is to, either create a separate ...
2
votes
1answer
29 views

Payable function that returns value: when is this example practical?

To quote an example from a book: contract StockPriceOracle { uint quoteFee = 500; mapping (string => uint) private stockPrices; //... function getStockPrice(string _stockTicker) payable ...
1
vote
2answers
41 views

How to read data returned by a function? [duplicate]

Counter.sol: pragma solidity >=0.5.0 <0.7.0; contract Counter { uint public _counter = 0; function GenNextID() public returns (uint) { return _counter++; } } I use ...
0
votes
2answers
107 views

Infura Json RPC: how to call a function passing parameters?

IMPORTANT My final goal is receive data via api on a php server and use Infura to call my contract to save the data Test Situation having this test contract on rinkeby contract test008 { ...

1
2 3 4 5
17