Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
16 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
0answers
11 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
19 views

How to get the return value of call methods in web3 v1? [on hold]

As explained here, when we use web3 v1, we need to use a different way of calling functions (either to read the staet by call() or execute a function by sending transaction). It is not clear how we ...
0
votes
0answers
16 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
42 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
15 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
9 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
21 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
28 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
32 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
39 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
49 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
72 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
16 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
votes
0answers
15 views

Direct token invocation works, indirect invocation gives Transaction ran out of gas

When i invoke the function mint directly on the ERC20Token it works as expected. However when i invoke via the TokenManager.mint i receive an out of gas expection. I am running a local parity client, ...
1
vote
1answer
86 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
29 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
101 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
45 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
37 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
50 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
18 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
23 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
19 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
75 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
31 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
36 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( ...
1
vote
2answers
70 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 ...
2
votes
2answers
270 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
99 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
22 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
23 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
42 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
35 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
57 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
64 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
111 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) { ...
1
vote
2answers
81 views

ethereum smart contract security check [closed]

How to prevent smart contract from the vulnerabilities? what are all the security measurements we need to consider before publishing our smart contract? Regards Mani
1
vote
0answers
35 views

encodeABI() throws Uncaught (in promise) Error

I am trying to use encodeABI() on one of my contract methods like this: signTx = async () => { ... const response = await contract.methods.recoverAddr(fixed_msg_sha, v_decimal, r, s)....
2
votes
1answer
64 views

Contract working on Javascript VM and not Web3 Provider, why?

Here is the code: Calling contract: pragma solidity ^0.4.24; contract Caller { address public called_address; constructor() public payable { } function set_address(address _addy)...
1
vote
0answers
90 views

How to access data from web3.eth.Contracts.send() function?

If I run this chunk of code from my async function I will get a transaction receipt as an output: const response = await contract.methods.recoverAddr(hex_msg, v_decimal,r, s).send({from: accounts[0]}...
1
vote
0answers
46 views

Possibly hacked but not sure Help!

I recently had most ERC20 tokens moved from a MEW wallet through the individual ERC20 contracts. Does anyone know how this may have happened? I am sending pertinent info from one on etherscan.io 1)...
2
votes
1answer
153 views

Using Python to invoke smart contract [duplicate]

I'm currently writing a thesis on a simulation of a peer to peer electricity market. The payments between the agents of the simulation would be settled through an Eth smart contract. I would like to ...
2
votes
1answer
132 views

Get return data from delegatecall

I'm using a low level delegatecall to forward my calls to a library. I need to (in this order) : load bytes4 sig into _message from memory load bounty (STRUCT) into _message from storage load bytes ...
1
vote
1answer
47 views

Call a view function of an Ethereum Smart Contract using a program written in C

my attempt is to call a view function to reatrieve some data from a contract on the Blockchain using a C program. I do have the interface of the contract. I think i need to performe two things in ...
1
vote
1answer
62 views

Pure function execution flow

We're working with the project in which we're storing some confidential details (different for each user)in smart contract, we don't want to show this information to anyone else even miner, thus we ...
1
vote
1answer
48 views

do smart contracts execute sequentially in each node or in parallel/simulteneously? across all nodes?

do smart contracts execute sequentially in each node or in parallel/simulteneously? across all nodes? 2nd question is - Does it execute on "ALL" nodes including Light nodes as well?
0
votes
1answer
245 views

How to estimate gas cost for contract method using geth

I want to estimate a contract method gas cost using geth. I understand there is no direct way using geth as in the web3 libs. But I don't understand what is the second argument needed and how I can ...
1
vote
1answer
71 views

Solidity: using low level call function on an EOA

Say I have a contract with a method that does a low level call on an address _addr assuming the target address is a contract with a certain method isValid(): contract Dummy { function doCall(...
0
votes
2answers
41 views

Can code send ETH to user accounts?

I was watching a talk by Vitalik in DEVCON1 in which he says code can do three things one of them being code can send ETH to other contracts. But can it send ETH to users account as well? Attached is ...