Slide 61
Slide 61 text
Solidity ( )
pragma solidityˆ0.7.0;
contract IndivisibleAsset { /* */
string public _name;
string public _symbol;
uint256 public _quantity;
address public _owner;
constructor(string memory name, string memory symbol, uint256 quantity) public {
_name = name;
_symbol = symbol;
_quantity = quantity;
_owner = msg.sender;
}
function transfer(address to) public returns (bool) {
require (_owner == msg.sender);
_owner = to;
return true;
}
}
B 2023 — 2 — 2023-10-23 – p.61/64