Stack Exchange Network

Stack Exchange network consists of 175 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
0answers
39 views

How do I send a transaction to a smart contract?

I need to build this transaction and send it to the blockchain how do I do it ? I always used ethsendrawTransaction just to send eth but never I never built this type of transaction: { "data": [ ...
1
vote
1answer
48 views

Is it possible for a smart contract to relay raw signed transaction

I am rethinking the flow for token transfer and confirmation on the network (ERC20,ERC721...). I am unaware of a way presently to: 1- transfer tokens and 2- trigger a call in different contract, ...
0
votes
0answers
18 views

web3j.ethCall returns null when retrieven contract variable

Environment: Geth node Geth/v1.9.0-unstable/windows-amd64/go1.12 Commands used to start the node to mine: geth --datadir "." --networkid 101 -verbosity 6 --port 30301 --rpcport 8101 --nodiscover -...
0
votes
1answer
27 views

How can Contracts sign transactions, when they dont have a private key?

When transactions are made the sender is identified by his signature. But Contracts dont have a private key to sign any transaction or message. So I have some questions: Can a Contract initiate a ...
0
votes
2answers
22 views

Can events always be called directly by user accounts? Is there a way to make them internal?

I am using events to fire an order, basically using them as a vehicle for a master/slave connection with an IoT device, through the blockchain. Ideally i want to always verify the right msg.sender is ...
1
vote
1answer
17 views

if the smart contract has terms to be met in a time order and transactions corresponding to the terms, what happen when two different users [closed]

if the smart contract has terms to be met in a time order(assuming in one year time frame) and transactions corresponding to the terms, what will happen to the variables stored in the contract account ...
2
votes
2answers
27 views

two of transactions initiating the same smart contract in one block during state transition cycle, what happen?

if two of transactions initiating the same smart contract in one block during state transition cycle, what will happen to the contract account balance and the variables(or data) changes through ...
1
vote
1answer
23 views

Is it possible to get a function's original returndata if it is wrapped in an interface that doesn't return anything?

Will a function's returndata persist through a wrapper, even if the wrapper does not support a return value? An example would be as follows: contract OriginalContract { function originalFunction()...
1
vote
1answer
19 views

Where is the position of each paramter in a smart contract function when encoded as inputdata in a transaction

When I reviewed the BEC attack, I found the position of each parameters value in real transaction was not corresponding in to definition of function in smart contract. The exploit transaction is at: ...
1
vote
1answer
14 views

What is the advantage and disadvantage of deploying Erays on Ethereum?

I have read this paper, Erays: Reverse Engineering Ethereum's Opaque Smart Contracts. They proposed this reverse engineering tool for Ethereum smart contracts. it will take as input a compiled EVM ...
0
votes
0answers
24 views

Debugging a reverted transaction

I have two wallets: Wallet1: 0x8882528C7104e146E0500203C353C09922575385 Wallet2: 0xddCf0FeC78b5a20B9138F5DDb1357E3B60026a67 Each of them has more than 1 Ropsten ETH. Using web3js and Infura ...
0
votes
1answer
19 views

Can transaction fail after being sent?

I wonder what would happen in following hyphotwtical scenario. Transaction is being sent with blockchain state A. In this state transaction consume 100_000 gas and sender has enough funds to pay for ...
1
vote
0answers
13 views

How the following scenario be achieved using smart contracts?

Assuming we have two parties (A & B). How the following scenario be achieved using smart contracts? User A will deposit some funds (x coins). user A can receive penalty funds from user B, So user ...
0
votes
1answer
14 views

Condition for changing a smart contract

I'm developing an application using smart contracts. I wonder if it is possible to establish different states for a contract, for example: User 1 determines a condition X, but also determines that ...
0
votes
0answers
27 views

Get the result back of a smart contract function call using INFURA

This is the function I use to send a signed transaction using Infura to invoke a smart contrac function (see details for the params of the transaction). web3.eth.sendSignedTransaction('0x' + ...
0
votes
0answers
13 views

Hot to debug a contract method invocation?

Running this code: PrintProofOfWork.methods.printRequested(gcodeHash).send({from: web3.eth.defaultAccount}) .then((result) => { console.log(`result of the invocation: ${...
0
votes
0answers
26 views

Contract deployment not working anymore

So I have this following code that was working a couple of weeks ago and today I decided to run a few tests and it just doesn't do its job anymore. function approve(rid, guest_wallet, ctr_key, dti, ...
0
votes
0answers
19 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
54 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
17 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
28 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
33 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
36 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
39 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
39 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
45 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
27 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
23 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
15 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
90 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
23 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
48 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 (...
0
votes
1answer
122 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
22 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
23 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
61 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
22 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
15 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
57 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
44 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
45 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
49 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
71 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
80 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
18 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
101 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
59 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
146 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
94 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
71 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 ...