Skip to content

Commit

Permalink
Upload eth smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbx committed May 11, 2023
0 parents commit e804918
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# crypto
crypto code development
22 changes: 22 additions & 0 deletions eth/collector.sol
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit e804918

Please sign in to comment.