Timeline for Escrow account creation in the example ICO contract from openzeppelin
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 28, 2018 at 16:37 | vote | accept | iappmaker | ||
Oct 28, 2018 at 8:55 | comment | added | Aquila |
address(this) casts escrow contract to address (simply it gets address of escrow contract). _beneficiary.transfer(address(this).balance) transfers all ethers from escrow to beneficiary
|
|
Oct 28, 2018 at 3:19 | comment | added | iappmaker | Okay.. One last clarification in the function beneficiaryWithdraw() at the contract RefundEscrow . what is " address(this)" in the line _beneficiary.transfer(address(this).balance); | |
Oct 27, 2018 at 20:19 | comment | added | Aquila |
here is documentation ethdocs.org/en/latest/contracts-and-transactions/… it can be helpful to read it. contract account is not controlled by private key, it is controlled by code. contract can be created from another contract, the code _escrow = new RefundEscrow(wallet()); does it. you shouldn't have key-pair to do it from code.
|
|
Oct 27, 2018 at 20:09 | comment | added | iappmaker | In RefundEscrow constructor, I am unable to see the place where the escrow account is generated with a key pair. In the constructor, I see that they are checking require(beneficiary != address(0)); and saving the beneficiary. Where the escrow account comes into picture (I mean the key pair generation). Also as per the logic of blockchain I understand that the transactions in a address is possible only when we know the private key. Where it is generated and stored. The Question may me very basic but I would be happy if you could throw some light on it. Thanks in Advance ! | |
Oct 27, 2018 at 17:32 | comment | added | Aquila |
1. In a constructor of RefundableCrowdsale contract -> _escrow = new RefundEscrow(wallet()); 2. Contract account doesn't have private key 3. take a look source code of RefundEscrow github.com/OpenZeppelin/openzeppelin-solidity/blob/master/… beneficiary (your wallet) can withdraw funds, when the escrow stopped
|
|
Oct 27, 2018 at 17:22 | comment | added | iappmaker | Yes Aquila, 1.In the example contract where the Escrow account is getting created? 2.Does the contract hold the private key of the escrow account? 3.How the contract gains access over the escrow address ? | |
Oct 27, 2018 at 17:14 | history | answered | Aquila | CC BY-SA 4.0 |