Thomas E Lackey
d4436948ac
* WIP: Update for testing with Merge fixturenet. * Switch channel to take a *Transaction rather than []byte. This allows us to access the TX fields (eg, for logging) throughout its lifecycle. * Tweak message * Add code to check for TXs being put into blocks. * 0 == unlimited * Use -1, not 0, for unlimited. * golang 1.19 * Read contract from file.
29 lines
480 B
Solidity
29 lines
480 B
Solidity
// SPDX-License-Identifier: AGPL-3.0
|
|
pragma solidity ^0.8.0;
|
|
|
|
contract Test {
|
|
address payable owner;
|
|
|
|
modifier onlyOwner {
|
|
require(
|
|
msg.sender == owner,
|
|
"Only owner can call this function."
|
|
);
|
|
_;
|
|
}
|
|
|
|
mapping(address => uint256) public data;
|
|
|
|
constructor() {
|
|
owner = payable(msg.sender);
|
|
}
|
|
|
|
function Put(address addr, uint256 value) public {
|
|
data[addr] = value;
|
|
}
|
|
|
|
function close() public onlyOwner {
|
|
selfdestruct(owner);
|
|
}
|
|
}
|