Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contract
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
contract
Commits
87924b78
Commit
87924b78
authored
Jun 14, 2024
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update receive eth
parent
e5d70fb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Distribution.sol
contracts/Distribution.sol
+3
-0
hardhat.config.js
hardhat.config.js
+1
-1
No files found.
contracts/Distribution.sol
View file @
87924b78
...
...
@@ -37,6 +37,7 @@ contract Distribution is IDistribution, Ownable, Pausable, ReentrancyGuard {
require(MerkleProof.verifyCalldata(proof, _merkleRoot(), leaf), "Invalid proof");
uint256 userCanClaimAmount = userAllAmount - userClaimed[msg.sender];
require(userCanClaimAmount > 0, "Nothing to claim");
userClaimed[msg.sender] = userAllAmount;
transferToken(msg.sender, userCanClaimAmount);
emit Claimed(msg.sender, userCanClaimAmount, userAllAmount);
...
...
@@ -54,4 +55,6 @@ contract Distribution is IDistribution, Ownable, Pausable, ReentrancyGuard {
function claimedOf() public view returns (uint256){
return userClaimed[msg.sender];
}
receive() external payable{}
}
\ No newline at end of file
hardhat.config.js
View file @
87924b78
...
...
@@ -13,7 +13,7 @@ module.exports = {
},
networks
:
{
testnet
:
{
url
:
'
https://dev.rpc.a
gicoin
.ai
'
,
url
:
'
https://dev.rpc.a
onet
.ai
'
,
accounts
:
process
.
env
.
PRIVATE_KEY
?
[
process
.
env
.
PRIVATE_KEY
]
:
[]
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment