diff --git a/README.md b/README.md new file mode 100644 index 0000000..0881376 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# crypto +crypto code development diff --git a/eth/collector.sol b/eth/collector.sol new file mode 100644 index 0000000..ebc2c11 --- /dev/null +++ b/eth/collector.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.8.2 <0.9.0; + +/** + * @title Collector + * @dev Retrieve value and store + * @custom:dev-run-script ./scripts/deploy_with_ethers.ts + */ +contract Collector { // 0x45EB13b669b2E503914FB4855f97CaEA10cD8eA6 + address public owner; + uint256 public balance; + + constructor() { + owner = msg.sender; + } + + // Accept any incoming amount + receive() payable external { + balance += msg.value; + } +}