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
9 views

How to integrate Dapper Wallet smart contracts with web app?

Dapper Labs who are the creators of Cryptokitties recently released their own wallet which is run by smartcontracts. They have open sourced the code: https://github.com/dapperlabs/dapper-contracts I ...
2
votes
1answer
11 views

bn256 and Boneh-Boyen digital signature in solidity

I am looking to have a full-fledged implementation of bn256 in solidity. And Boneh-Boyen digital signature. Is there is any available built-in libraries or implementation in solidity to bn256 and ...
0
votes
1answer
15 views

Can function calls in other contracts change states?

In Solidity, is it possible to change states via function calls in other contracts? For example, let's consider the code below, where we have three assumptions: The function test2 is defined in the ...
0
votes
1answer
13 views

Are erc20's counted in market cap ethereum?

Are all erc20 ethereum tokens backed by some deposit of ether to a contract? If so, is there an overlap in the market cap of the current 24 billion in ether and the value of all the erc20 tokens?
0
votes
2answers
35 views

Quorum Can a non permissioned node change the states of private contract if the node knows contract addr and ABI?

I have ran the quorum-example, deploying a private contract. https://github.com/jpmorganchase/quorum-examples/tree/master/examples/7nodes I followed the commands written in README. However, I'm quite ...
0
votes
1answer
28 views

Multisig function calls

I am making a dapp in which ethereum user accounts that call certain functions are rewarded with an ERC20 token. All the dapp is based on functions using only one ethereum account as parameter. But if ...
0
votes
1answer
26 views

How to get Hash of function with many returns types?

I have a method : function getBalance(address _add) public view returns (uint256, string memory, bool, uint256, uint256, uint256) { return(accountBalance[_add].amount, ...
1
vote
1answer
32 views

How can I call the permanent ENS registrar contract directly from sbt-ethereum?

I would like to register a name (e.g. 'somename' >= 7 characters) with the new ENS contract using sbt-ethereum and the .eth registrar controller, for one year. I have confirmed that the code in the ....
3
votes
1answer
26 views

How would I exchange ETH for DAI in uniswap directly from sbt-ethereum?

Firstly, i love sbt-ethereum. It is zippy and an absolute pleasure. Having completed the contract-interaction portion of the tutorial, I wanted to test out a live contract. I would like to interact ...
0
votes
2answers
29 views

msg.sender.balance inside contract

what does/should msg.sender.balance return when used inside contract? Assume we have contract A, calling B, which is calling C. msg.sender is propagated with the calls down to B and C The user is ...
1
vote
1answer
28 views

How does contract of dapp figure out who buyer is?

How does contract of dapp(eg. market place) figure out who buyer is? If buyer wants to purchase servive(or product) at certain dapp, he should transfer tokens to contract address of the dapp. At ...
0
votes
1answer
23 views

Regarding interaction between smart contracts [closed]

If we have a case where we have Two smart contracts. Contract A passes value to Contract B. the address of contract A is also passed to contract B in the smart contract. while compiling the contract B ...
0
votes
1answer
33 views

Web3js :interact with smart contract

I'm currently struggling to interact with my smart contract, I don't if it comes from the way I call the function or the way I connect to my smart contract. Here is the code const contractAddress = '...
1
vote
1answer
28 views

How to access a smart contract function protected by access rights using Web3?

I have a smart contract address for security tokens, and certain functions of it are protected by access rights, for which I have an address to access those functions, however I am not able to figure ...
0
votes
1answer
31 views

Create a large number of contracts with different addresses

I'm developing a performance test where I check the time a gateway spends to find a contract in a blockchain. I'm using ganache-cli to simulate the blockchain, my doubts are: 1) Is it possible to ...
1
vote
1answer
16 views

During gas-free transaction get an error “No relay responded! 4 attempted, 4 pinged”

I did all modification related to this instruction https://github.com/tabookey/tabookey-gasless However, when I'm trying to write some tests it fails and provides me the following error Error:...
0
votes
1answer
20 views

Retrieve the status of a contract by its creator

In a situation where there are multiple contracts stored in different blocks, is there any method to retrieve the status of a contract through its owner's address? (e.g. in my situation, each person ...
0
votes
0answers
25 views

Load smart contracts in Java application without having the java wrapper class for Web3j (only the address of the contract)

I use web3j to interact with my local Ethereum node (created with geth), and I was wondering how should I handle smart contracts created at runtime. I know that in order to deploy a smart contract ...
0
votes
0answers
17 views

call() returning BadFunctionCallOutput in web3.py

Have a very basic ERC721 contract based on OpenZeppelin-Solidity, as follows: pragma solidity ^0.5.7; import 'openzeppelin-solidity/contracts/token/ERC721/ERC721Mintable.sol'; import 'openzeppelin-...
0
votes
0answers
18 views

Understand the `call` opcode in this contract

Hello, I am posting a quick question regarding the functionality this contract: https://etherscan.io/address/6b63ea3612dde97082aab468157950f927618d31#code From the source code, I am not even able to ...
0
votes
0answers
19 views

How is it possiblle - Although one or More Error Occured [Reverted] Contract Execution Completed?

How is it possible that the txn is reverted due to some error but completed? https://etherscan.io/tx/0xc35fde759557f7742224373ea0777cc7ec36bac98dd678aa621ab96063c29e1c
0
votes
1answer
32 views

Automatically Run Contract

I have a private ethereum network made up of multiple nodes and I would like one of them to interact with the a deployed smart contract without my input. Is it possible for create a script that will ...
1
vote
0answers
78 views

Smart contract method error: 'abi: unmarshalling empty output'

I had a working Solidity contract, made a change to its function signature (to take in an array of addresses, instead of a single address), I compiled it, ran abigen and generated Go bindings. Below ...
1
vote
0answers
28 views

How to call a contract function using Nethereum?

I would like to call a contract function using Nethereum C#. Here is the contract in Etherscan (https://etherscan.io/token/0x8c9b261faef3b3c2e64ab5e58e04615f8c788099#readContract) I want to call ...
0
votes
3answers
47 views

Limit the number of times a static function is called

As far as I am concerned, when a function in a smart contract is defined as pure or view it is possible to invoke it without being charged for the gas consumption that its execution requires. This ...
1
vote
0answers
27 views

Solidity: Creating contracts with contracts by “new” operator

I'm creating "Trade" contract inside "Token" contract. I used an array to store each "Trade" contracts. Used web3, truffle. Token.sol: mapping (address => Trade[]) private _Trade; event tradeMade(...
1
vote
1answer
47 views

state variable value not changing

I have very simple solidity code as below - pragma solidity ^0.5.6; contract SaveData { uint public salary; function setSalary(uint input) public { salary=input; } function ...
0
votes
1answer
37 views

Can't return string when function not pure? [duplicate]

See the below contract function of which return the string (Tested in Remix.org): pragma solidity >=0.4.22 <0.6.0; contract HelloWorld { function get() pure public returns (string memory){ ...
0
votes
1answer
130 views

Deploying and calling a contract works only with Ganache (not with Geth)

I deployed a HelloWorld contract using web3j and it worked awesome with Ganache. I was able to call my only function from the contract and it returns the desired result all the time. When I deploy ...
0
votes
1answer
30 views

Difference between ERC20 and ERC223

i still don't get the idea behind the "if you send 100 ERC20 to a contract, they're stuck there and these 100 ERC20 are lost forever".. i really don't get.. like, a contract has an address and a ...
2
votes
2answers
53 views

How much data can I store in a smart contract, what is the cost and how it is implemented?

If I suppose I use a smart contract as a database, how much data can I store? speaking only of strings and integers, save them in contract data structures does it cost in addition to the gas used for ...
1
vote
2answers
20 views

Verify transfered amount of two transactions from same ERC20 to same Contract

I making a contract to sell stuff in a decentralized way and want to use following method to transfer founds. function transferToken(address token, address from, uint256 amount) internal { IERC20 ...
0
votes
0answers
47 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
56 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
68 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
42 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
18 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
30 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
27 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
25 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
16 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
52 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
20 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
16 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
38 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
24 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
50 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
31 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....