We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0answers
38 views

Which invocation of 'call' would invoke the fallback function?

Can somebody please guide me which 'if statement' would result in invoking the fallback function? if (msg.sender.call.value(balance)()) { totalBountyAmount -= balance; OR if (msg.sender.call....
0
votes
1answer
136 views

Calling another contracts function -minimum info required

I understand how to call another contracts function. My question is, if I want to use an interface like in this question over call(): Call function on another contract contract Name { mapping(...
0
votes
1answer
21 views

Is it possible to have a contract run whenever a wallet address receives a transaction?

I'd like to build some code that monitors a wallet address, and performs an action whenever that wallet receives a transaction. I could do this with say javascript or whatever, but that doesn't offer ...
2
votes
1answer
46 views

ERC223 and ERC827 can receive erc20 tokens and call a function immediately?

As the title says, is that possible? For example on my ico contract, I accept USDT erc20 token and when I receive each transaction, call a function for that and send that address my tokens or eth.
1
vote
1answer
75 views

get bytecode in smartcontract ? possible?

is it possbile to get bytecode of already deployed contract on another contract? example : get bytecode of contract A using contract B (using solidity )
0
votes
2answers
115 views

Code Example from “Mastering Ethereum: Building Smart Contracts and DApps” doesn't work

I'm reading the Ethereum book of Gavin Wood right know and the following code example gives an error message when I try to compile it with truffle: pragma solidity ^0.4.22; contract calledContract { ...
0
votes
2answers
47 views

Including an owner address based automated routine execution in a React ethereum dapp?

As I understand, all the front-end components for a react based ethereum dapp are rendered from the point of view of the user's metamask default account. All the calls to constant functions in ...
3
votes
1answer
62 views

Benchmarking energy usage of executing smart contracts

I'm working on a project that will allow for me to benchmark of the top ten most popular smart contracts which I'll take from EtherScan. The idea of the project is to determine if the smart contract ...
0
votes
1answer
104 views

Public smart contract that calls Private contract API

In a private blockchain (e.g, quorum), assume that I have a peer X and peer Y. X has a private smart contract (A) and Y has a public smart contract B. Assume that A provides an API for Y in order to ...
1
vote
2answers
31 views

Call to smartcontract without address

Lately I had a conversation with someone who says that it is possible to make a call to the smart contract without giving the address. He said it's possible to send certain parameters and by them the ...
1
vote
0answers
27 views

Replaying the Bad Parity Hack

On a locally hosted instance of Ethererum I am trying to replay and understand the Bad Parity hack. I have a Wallet and a Wallet Library Contract. Wallet.sol constructor(address lib) public payable {...
0
votes
1answer
26 views

How does one go about implementing the ContractTransactor interface from the bind package in go-ethereum?

Hey guys thanks in advance! Here is the interface provided by the go-ethereum library in the bin package. I need an example on how to implement this interface please :) // ContractTransactor ...
2
votes
3answers
98 views

What other constants depend on the current call like msg.sender?

I recently noticed that msg.sender isn't always the original caller's address (see here). It's the address of the current call. So if foo() calls bar(), then msg.sender in bar() will be the address of ...
1
vote
1answer
36 views

How to burn non burnable ERC20?

Suppose you received 250 HELLOCoins and you want to burn them. Unfortunately, HELLOCoins uses OpenZeppelin ERC20 which implements the following function: function _transfer(address from, address to,...
0
votes
1answer
215 views

truffle-contract: Contract has not been deployed to detected network (network/artifact mismatch)

I am running a private network and would like to use truffle-contract to interact with the contracts. Unfortunately it gives me this error: Error: Contract has not been deployed to detected network (...
1
vote
2answers
414 views

truffle-contract error: Number can only safely store up to 53 bits

I am using truffle-contract with a local quorum node and try to execute a smart contract method, but getting this error: Error: Number can only safely store up to 53 bits That's the way I do it: ...
0
votes
1answer
42 views

Interacting with Already deployed Ethereum Contract and recording response

I understand this topic has been discussed before, but my question is specific to web3.py. How can I interact with function of already deployed ethereum contracts on Ropsten TestNet. my code runs with ...
0
votes
0answers
32 views

Ethereum blockchain monitoring and contracts input data parsing

I am monitoring a particular addresses, that may be used as transactions' destination addresses in contracts' internal transactions. I should support monitoring of the sendMultiSig method (contract - ...
0
votes
1answer
82 views

How can a peer request another peer to invoke a function from his private contract

I build a permissioned network using Quorum, I have a peerA which has a private smart contract, another peerB that cannot invoke functions of the smart contract as it is private So, can peerB send ...
1
vote
0answers
51 views

state channel between smart contracts

In my scenario, there are data sellers and data buyers which might be persons or organizations. I would like to create a smart contract for data seller and another smart contract for data buyer where ...
0
votes
0answers
34 views

How to run the sample contract Blind Auction?

There is an contract example called Blind Auction, and I try to run this in the Remix compiler. Without any edition, I can deploy it. But every time I tried to run the bid function, error always ...
2
votes
1answer
194 views

How can I call contract method that suicide and continue execution?

Can I call another contract that eventually will call selfdestruct, and keep executing my function? For example, say I have two contracts as follows: contract Destructor { address owner; ...
0
votes
1answer
99 views

web3.py locally signed transaction rejected because of invalid nonce

I'm trying to sign locally a transaction to a smart contract method using web3.py. I'm using ganache and there is one interesting issue when I send a transaction as the contract deployer everything ...
0
votes
1answer
96 views

what is the equivalent of encodeFunctionSignature for web3.js version ^0.20.6

I want to check if a specific contract deployed at an address is an erc721 contract. I found out that most of the erc721 contracts should have safeTransferFrom function implemented. (except ...
1
vote
1answer
160 views

Unable to schedule a call using Aion Recurring Contract

So here's the contract that I deployed on Ropsten Network. I took code refer from here. pragma solidity ^0.4.24; // interface Aion contract Aion { uint256 public serviceFee; function ...
0
votes
1answer
170 views

How msg.sender changes through relaying function calls between contracts? [duplicate]

Here is the example for question. contract example1 { function A() { print msg.sender; // just fake code to imagine it prints out the result example3.C(); } } contract example2 { ...
1
vote
1answer
139 views

How msg.sender changes through relaying function calls?

I'm confused about how msg.sender changes through relaying function calls. I know that msg.sender sets to the caller(it should be me) address at first, but through the process, msg.sender can change ...
1
vote
1answer
25 views

Metamask Web3js Synchronous Method Error

Okay guys, I'm a complete newbie to Ethereum and Web3.js and going through the Crypto Zombies tutorial and have done okay so far. But, when I use this function in my index.html file as they show it I ...
1
vote
1answer
146 views

Understand an EVM call instruction with gas as 0x00

I am trying to understand the following EVM call instruction generated from here: https://ethervm.io/decompile memory[temp3:temp3 + 0x00] = address(msg.sender).call.gas(0x00).value(var1)(memory[...
1
vote
1answer
114 views

Byte32 error, even after converting string to hex

I looked everywhere for people with similar problems, but I couldn't find anything. I am confused why I keep getting this error (yes, I know others have had this error too, but not for the same ...
2
votes
1answer
286 views

SOLVED How to retrieve Ether from old multisig wallet contract?

I have a 1.5 years old multisig wallet contract. I am able to import it to Ethereum Wallet (version 0.11.1) through Contracts -> Watch Contract menu and that way I can run some functions on it ("Add ...
2
votes
1answer
190 views

How to convert string to type defined by an abi.Type for payload construction?

I am writing a CLI in Go that should faciliate users to be able to make contract function calls from it. This entails generating contract ABIs and providing input parameters to the function arguments ...
-2
votes
1answer
159 views

What other function calls can freeze a smart contract like the pause() function?

I'm learning to audit Ethereum smart contract code for clues if a smart contract can be frozen or not. Many smart contract creators claim their contracts are "unstoppable", but I'd like to know if ...
0
votes
1answer
131 views

How to interact with a MainNet contract from a console?

This question may be really dumb, but I fail to understand how to do this. I have deployed a smart contract to MainNet, and so far I've been interacting with it via Web3JS and Truffle (via the ...
0
votes
1answer
27 views

DApp on Node2 accessing smart contract deployed by Node1

Node 1(Desktop) deployed a contract on private blockchain. From node2(Laptop),I want to interact with the contract. But I failed at 'web3.version.getNetwork(err, netId)' function.This function throws ...
1
vote
1answer
46 views

Not connecting to private blockchain from another node on the network [duplicate]

I have a Desktop and Laptop.I have configured private blockchain on my Desktop(node1) and able to sync with it from Node2 Laptop.But I am not able to get connected to the contract deployed on Node 1 ...
0
votes
1answer
36 views

How to call nameless function from contract, say “fallback” function(){}

I mean I am using myetherwallet and there I paste the ABI, yet the ABI has all functions described except the function (){}, so should I make up some name and just call it, would this ever work or? ...
0
votes
1answer
272 views

Access private blockchain from another PC/Laptop?

I have private block chain on my PC.The private blockchain is configured and deployed using geth. I want to connect to that blockchain from another node(my laptop) to access the smart contract ...
0
votes
1answer
67 views

Invoking smart contracts

how can i restrict my smart contract getting invoked by any account in the network.can i tell the EVM itself to check(validate the account) is allowed to invoke the smart contract even before entering ...
0
votes
1answer
37 views

Can you input a variable into a contract call?

In ETH could you call a contract by inputting a variable parameter? As in the value of that parameter is unknown at call and must be evaluated at run-time? Something like "someFunction( ...
2
votes
2answers
237 views

How do I call a function into a contract with solidity and want to continue execution even if this call reverts?

I have looked into the Solidity docs but cannot seem to find this feature. I want to call into a contract and want to push two values onto the stack: the actual return value AND if the execution ...
3
votes
2answers
543 views

Ethereum Smart Contract execution principle

I have a question that might sound really dumb, but its understanding is crucial for me. Say, I have a Smart Contract, which has a public variable, and a setter to change that variable. If a Smart ...
0
votes
1answer
523 views

Calling a “view” function using web3js

--- HEAVILY EDITED --- Solidity contract: pragma solidity ^0.4.24; contract PatientRecords { struct Patient { string ID; string weight; string height; string diseasehistory; ...
0
votes
1answer
28 views

Running contract code in javascript without deploying on chain

I am building a state channel battleship game. I have a stateless contract which contains all my gameplay logic and another statechannels contract which contains all the dispute logic. Ideally, I ...
1
vote
1answer
27 views

Doubt in javascript function execution

hi guys I have this contract function: function teste(uint _oX) public returns (uint value) { return 34; } And I try to call in JS this way : MyContract.teste(1).then(value => console.log(...
0
votes
1answer
73 views

getting result of a method of smart contract that don't change any state variables

I know in ethereum if a method of smart contract don't change state variables we can see it's result without making any transaction. now I want to know how can see result of this method ...
0
votes
1answer
88 views

Contracts are “instantiated” by the account creating transaction?

I read the following in a research paper: Short Paper: Formal Verification of Smart Contracts that: contracts are “instantiated” by the account creating transaction; this will allocate the ...
0
votes
1answer
155 views

Adding quotation marks to string before calling a function [closed]

Alright, so I'm not sure if I should be asking this here or HTML/JavaScript forums, so please do let me know if I am in the wrong place. I believe it belongs here as you all understand dApps and ...
1
vote
1answer
138 views

Ether transfer from Account to Account with smart contract doesn't work

I've been struggling for a whole day trying to figure out what's wrong with my smart contract but I couldn't sort it out. Any help is appreciated, I'm sure I'm missing something :( Here is my ...
0
votes
2answers
292 views

Calling Truffle Commands through a script

I made following contract using visual studio code pragma solidity ^0.4.17; contract IDSCheck { mapping( string => string ) PersonHash; function AddHash(string name, string hash) { ...