ipld-eth-db-validator/test/contract/contracts/Test.sol
Roy Crihfield bc3a7934cf
Upgrade to v5 schema (#32)
* refactor vulcanize => cerc
* update geth and cerc dependencies
* update packages, ginkgo
* refactor chain generation
* update integration tests, contract, makefile
* go embed contract code
* rm old readme
* move unit tests into package
* rm ginkgo where not needed
* use tx in ref integrity functions
2023-06-22 07:25:27 +08:00

29 lines
590 B
Solidity

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;
contract Test {
event logPut (address, uint256);
address payable owner;
mapping(address => uint256) public data;
modifier onlyOwner {
require(msg.sender == owner, "Only owner can call this function.");
_;
}
constructor() {
owner = payable(msg.sender);
}
function Put(uint256 value) public {
emit logPut(msg.sender, value);
data[msg.sender] = value;
}
function close() public onlyOwner {
owner.transfer(address(this).balance);
}
}