1
私はsmartSponsorについてIBM Exampleを読んでいたし、この次のコードがある中で、スマート契約に送信する方法:関数誓約ですがエーテルはIBMの例
personal.unlockAccount(thesponsor,"password");
ss.pledge("Good luck with the run!", {from: thesponsor, value: 10000000, gas: 3000000});
は:
function pledge(bytes32 _message) {
if (msg.value == 0 || complete || refunded) throw;
pledges[numPledges] = Pledge(msg.value, msg.sender, _message);
numPledges++;
}
struct Pledge {
uint amount;
address eth_address;
bytes32 message;
}
私は "送信"または "転送"機能を探していました。しかし、私は何も見つけることができませんでした。それで、私はスポンサーからスマート契約にどのようにエーテルが送られたのか混乱しました。
更新:
送信者はどのようにエーテルを送信しましたか? .transfer(uint256 amount)や.send(uint256 amount)のようなものを期待していました。しかし、そのような関数呼び出しはないようですか?
しかし、送信者はどのようにエーテルを送信しましたか?
.transfer(uint256 amount)または .send(uint256 amount)のようなものを期待していました。しかし、そのような関数呼び出しはないようですか? –デフォルトのアカウントが使用されています。 – Marcin