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
6
votes
1answer
2k views

Passing ether with call to Solidity function

I have deployed a contract to testnet which appears to function. I have a function named contribute which gets the ether from the msg.value. The function is below and doesn't take any arguments. I ...
3
votes
2answers
172 views

What various components are needed to trigger an Ethereum contract?

From what I understand, you must provide Ether so there's an incentive for miners to run the contract, but what else is provided? Must you sign cryptographically (to make sure an unrelated party ...
2
votes
1answer
1k views

Understanding data payload on contract call [duplicate]

I'm running truffle's default example Metacoin: import "ConvertLib.sol"; contract MetaCoin { mapping (address => uint) balances; function MetaCoin() { balances[tx.origin] = 10000; } ...
20
votes
4answers
9k views

How does one contract send ether to another contract with more than 2300 gas?

I want one contract to collect a certain amount of finney before sending it to another contract, but I can't simply send in with C2.send(thisMuch). function() { Dividend m = Dividend(dividendAddr)...
16
votes
2answers
2k views

What happens when a smart contract gets several similar calls in the same block?

What happens when a smart contract gets several similar calls in the same block? Consider for instance this greeter: contract greeter { string name; function setName(string name_) { ...
15
votes
3answers
20k views

Call function on another contract

I've created a contract called "Name" which I've deployed to the testnet. this function just register some text for the user and display it back. My contract is: contract Name is mortal{ ...
6
votes
1answer
2k views

Call contract from another account using web3.js

I have a contract with which 2 accounts should interact. The accounts are in the same node in web3.eth.accounts. The contract was created by accounts[0]. How can I call that contract from accounts[...
5
votes
1answer
256 views

What happens if you chained delegatecalls?

Solidity docs say "only the code of the given address is used, all other aspects (storage, balance, ...) are taken from the current contract." This is useful when creating a library. But what happens ...
5
votes
1answer
419 views

Proper ethereum exchange workflow

I've recently found out, that there's no convenient way to monitor transactions to 'externally owned account' generated by some contract. I went to various forums and ethereum bugtrackers for an ...
3
votes
1answer
789 views

How to read responses from calls to contract methods made using web3.js?

I have built a contract which provides a simple method for storing some data in a property of my contract on the blockchain. I can interface with my contract using web3.js and I have no issue doing ...
10
votes
2answers
3k views

Is it possible to call Ethereum API from a Software Application without running an ETH node?

I was wondering if it's possible to make a call to Ethereum blockchain from a software application on my computer without having to run an ethereum node ? for example, I want to make calls from a ...
1
vote
1answer
103 views

Contract functions not triggered

My contract deployed on address 0x63788a3eace0d77c5573787e3f9c9515c246d0e6 Is not getting executed via Mist browser. I have tried execute NewPoll function that requires 4 fields text 32 bytes I ...
6
votes
3answers
3k views

Why does mist throw 'Uncaught invalid address'?

I'm trying to make a web page that gets a message from a simple "hello world" smart contract. Unfortunately, it isn't working. I'm seeing this in the Mist console. Uncaught invalid address v ...
3
votes
1answer
527 views

Does a contract message call require a signature from the sender?

Say for example you have this simple contract: contract Example { function sayHello() constant returns (string msg) { return "hello"; } And I make a message call: exampleContract.sayHello....
8
votes
1answer
4k views

Basic example of interaction between 2 contracts?

What is a basic example of one contract invoking a method in another (non-calling) contract? Would the address of the contract having that method always need to be hardcoded?
3
votes
1answer
244 views

How problematic is transitioning Augur's full-Serpent smart contract suite?

I read here that Augur's smart contract suite is actually written in Serpent. I'm aware that it is a relatively well supported language at the moment (at least compared to Mutan and LLL), but given ...
5
votes
1answer
1k views

Can smart contracts execute themselves? [duplicate]

Is it possible for a smart contract to autonomously execute (with no external interaction) when a certain condition is met? Say, when a certain time arrives. My thought is that smart contracts are ...
21
votes
2answers
6k views

Do I need a compiled contract just to get the ABI definition?

Why do I need a compiled version of the contract just to get the ABI definition? Seems like the contract address should be enough. Im very confused because I am simply trying to run a contract ...
17
votes
1answer
1k views

What is the order and concurrency behavior of multiple calls to a contract in a single transaction?

Suppose a contract has three call APIs that have side effects. What's the behavior if I try to: Call all three APIs from one address (i.e. issue three transactions if from nodejs). Are all three ...
4
votes
1answer
265 views

How does a client interact with a contract already in the blockchain?

I am looking for someone to help clarify the 'stacktrace' of interactions that occur when a client interacts with a smart contract. Clearly, one has to submit a transaction to a miner, who then has ...
2
votes
2answers
3k views

How can i sent ETH from a contract wallet to another account?

Use the mist wallet 0.3.9. The ETH from a pool is sent to a wallet address. How can I send the ETH from wallet to account? When I try to send from the wallet address to an exchange address, I saw ...
4
votes
1answer
2k views

Where exactly do DApps run? Who gets rewarded for running them? [duplicate]

So I am currently running a full node, as well as a GPU miner. I am curious first of all where do DApps get run? They wouldn't make sense to run on a GPU as they aren't very parallizable, so I am ...
16
votes
1answer
6k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
149
votes
2answers
30k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
2
votes
2answers
2k views

Attaching an address for a contract to call another contract

I am writing code where I want to call other contracts within my current contract. Bank.sol contract Bank { address owner; mapping (address => uint) balances; function init() ...
20
votes
2answers
18k views

How can I return multiple strings from a contract function?

In solidity it's obvious how to get a single string returned from a function. But, I'd like to have the smart contract return multiple string values. Is there a way to do this?
26
votes
2answers
10k views

'internal' keyword in a function definition in Solidity

Does the internal keyword in a function definition such as: function doSomeThing(uint _param) internal {...} work similar to designating a method as private in other languages and thus makes the ...
11
votes
2answers
809 views

What happens when two smart contracts recursively call each other?

As I understand it, a smart contract can "call" other smart contracts. So what happens when two smart contracts call each other in a recursive loop? Does the whole network break down and die?
27
votes
4answers
7k views

Does every node execute the contract code for each transaction?

This question was asked on Reddit a while ago: When a node sends a transaction to the network and has the receiver as a contract, does every node execute the contract bytecode with the inputs to ...
22
votes
2answers
16k views

How do I know how much gas to use when calling a contract?

When I am calling (sending a transaction to) a contract how do I determine how much gas to use? Is there a way to calculate this upfront & what happens if I send too much / too few gas?
7
votes
2answers
138 views

How does one know that one's contract has been executed?

What is the mechanism to know whether miners/validators have indeed executed one's contract, instead of just blindly validating it?
72
votes
9answers
14k views

Can contracts pay the gas instead of the message sender?

Is it possible for a contract to pay the gas costs (or part of it) that result from the contract being called? Or does the sender of a message always pay the resulting gas costs no matter what?

1
13 14 15 16
17