tx-spammer/sol/Test.sol
Thomas E Lackey d4436948ac
Update for testing with Merge fixturenet. (#11)
* 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.
2022-11-02 21:33:18 -05:00

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);
}
}