transferableTrustFund.sol
.
onlyOwner
modifier is used to restrict access to certain functions in the smart contract to only the owner of the contract. A modifier is like a wrapper that can be applied to a function, and it modifies the behavior of the function in some way:
withdrawAmount
— enter any amount that is less than the current contract balance to withdraw partial funds.withdrawAll
— click to withdraw all funds from the contract.transferAccount
— enter any Ethereum address to transfer the contract ownership. For this example, enter the address of your second account in MetaMask.getBalance
— click to display the current ether balance in the smart contract; the balance is shown in Wei.getOwner
— click to display the address currently owning the Trust fund smart contract.