Geth 1.13 (Deneb/Cancun) update #5
28
internal/testdata/Test.sol
vendored
Normal file
28
internal/testdata/Test.sol
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// 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);
|
||||
}
|
||||
}
|
1
internal/testdata/build/Test.abi
vendored
Normal file
1
internal/testdata/build/Test.abi
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"logPut","type":"event"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"Put","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"data","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
|
1
internal/testdata/build/Test.bin
vendored
Normal file
1
internal/testdata/build/Test.bin
vendored
Normal file
@ -0,0 +1 @@
|
||||
6080604052348015600e575f80fd5b50335f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506104378061005b5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806343d726d61461004357806365f3c31a1461004d578063b90d3d0c14610069575b5f80fd5b61004b610099565b005b61006760048036038101906100629190610255565b61018b565b005b610083600480360381019061007e91906102da565b610209565b6040516100909190610314565b60405180910390f35b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610126576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011d906103ad565b60405180910390fd5b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610188573d5f803e3d5ffd5b50565b7f370acc53a76362ca0f71a1b2e0c8b8ffbbc1ba9ff3166a1e2fa8445b4848626c33826040516101bc9291906103da565b60405180910390a18060015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555050565b6001602052805f5260405f205f915090505481565b5f80fd5b5f819050919050565b61023481610222565b811461023e575f80fd5b50565b5f8135905061024f8161022b565b92915050565b5f6020828403121561026a5761026961021e565b5b5f61027784828501610241565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102a982610280565b9050919050565b6102b98161029f565b81146102c3575f80fd5b50565b5f813590506102d4816102b0565b92915050565b5f602082840312156102ef576102ee61021e565b5b5f6102fc848285016102c6565b91505092915050565b61030e81610222565b82525050565b5f6020820190506103275f830184610305565b92915050565b5f82825260208201905092915050565b7f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f5f8201527f6e2e000000000000000000000000000000000000000000000000000000000000602082015250565b5f61039760228361032d565b91506103a28261033d565b604082019050919050565b5f6020820190508181035f8301526103c48161038b565b9050919050565b6103d48161029f565b82525050565b5f6040820190506103ed5f8301856103cb565b6103fa6020830184610305565b939250505056fea264697066735822122046cbe0cd7cb60e9af53ab8e1b71d25dda1c7a495ea5c049318ac83a92d14c15e64736f6c63430008190033
|
10
internal/testdata/contract.go
vendored
Normal file
10
internal/testdata/contract.go
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
package testdata
|
||||
|
||||
import _ "embed"
|
||||
|
||||
var (
|
||||
//go:embed build/Test.abi
|
||||
TestContractABI string
|
||||
//go:embed build/Test.bin
|
||||
TestContractCode string
|
||||
)
|
Loading…
Reference in New Issue
Block a user