Closed xhliu closed 2 years ago
E.g.,
(a, b) = (1, 2);
vs
Install the Solang VSCode
pragma solidity ^0.8.10;
contract Coin {
// The keyword "public" makes those variables
// readable from outside.
address public minter;
mapping (address => uint) public balances;
// Events allow light clients to react on
// changes efficiently.
event Sent(address from, address to, uint amount);
// This is the constructor whose code is
// run only when the contract is created.
constructor() {
minter = msg.origin;
}
function mint(address receiver, uint amount) external {
if (msg.sender != minter) return;
balances[receiver] += amount;
selfdestruct(receiver);
}
function send(address receiver, uint amount) external {
int gas = tx.gasprice;
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
emit Sent(msg.sender, receiver, amount);
}
function f(uint x) public view returns (uint r) {
assembly {
// We ignore the storage slot offset, we know it is zero
// in this special case.
r := mul(x, sload(b.slot))
}
}
}
unsupported, e.g., inheritance do not generate output file?
vs
e.g., emit()
Eventually, source map
when unimplemented features are encountered, masked in
Nothing
.Depends on: