From e804918e564dff352f16262f6cddc0a4b29c26d8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 11 May 2023 15:40:25 +0100 Subject: [PATCH] Upload eth smart contract --- README.md | 2 ++ eth/collector.sol | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 README.md create mode 100644 eth/collector.sol 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; + } +}