Address Contract Verified
Address
0xD71b30343d7Ce8Ab0d5cCd69c8473134d8216951
Balance
0 ETH
Nonce
1
Code Size
8581 bytes
Creator
0x45B83218...54d2 at tx 0x110698a8...ff136a
Indexed Transactions
0
Contract Bytecode
8581 bytes
0x608060405234801561000f575f80fd5b506004361061018c575f3560e01c80638da5cb5b116100dc578063cbc7854e11610095578063ebde5e5d1161006f578063ebde5e5d1461045b578063f2fde38b1461048b578063f3d8e190146104a7578063fc0c546a146104d75761018c565b8063cbc7854e146103f3578063cea9d26f1461040f578063d07e5d881461042b5761018c565b80638da5cb5b1461033157806395d4063f1461034f5780639811a8e51461036b57806399c5c8aa14610389578063a39b6d5f146103a7578063b519b038146103d75761018c565b806359eb82241161014957806369eee0051161012357806369eee005146102bc578063715018a6146102ed578063768c5ebf146102f75780638456cb59146103275761018c565b806359eb8224146102645780635c975abb1461028257806368e8c989146102a05761018c565b8063065af3d4146101905780631514617e146101c05780631fabdd0c146101de5780632b2f4d841461020e5780633f4ba83a1461022a5780634079213314610234575b5f80fd5b6101aa60048036038101906101a59190611741565b6104f5565b6040516101b79190611797565b60405180910390f35b6101c8610515565b6040516101d59190611797565b60405180910390f35b6101f860048036038101906101f39190611741565b61051b565b6040516102059190611797565b60405180910390f35b610228600480360381019061022391906117da565b61053b565b005b6102326105e6565b005b61024e60048036038101906102499190611741565b6105f8565b60405161025b9190611797565b60405180910390f35b61026c610618565b6040516102799190611797565b60405180910390f35b61028a61061e565b6040516102979190611844565b60405180910390f35b6102ba60048036038101906102b5919061185d565b610633565b005b6102d660048036038101906102d1919061189b565b61072a565b6040516102e49291906118c6565b60405180910390f35b6102f5610756565b005b610311600480360381019061030c9190611741565b610769565b60405161031e9190611797565b60405180910390f35b61032f61086d565b005b61033961087f565b60405161034691906118fc565b60405180910390f35b6103696004803603810190610364919061189b565b6108a6565b005b610373610b5d565b6040516103809190611797565b60405180910390f35b610391610b63565b60405161039e9190611970565b60405180910390f35b6103c160048036038101906103bc9190611741565b610b88565b6040516103ce9190611797565b60405180910390f35b6103f160048036038101906103ec9190611a3f565b610c8c565b005b61040d60048036038101906104089190611b3e565b610f1a565b005b61042960048036038101906104249190611b7c565b610fdf565b005b61044560048036038101906104409190611741565b61101f565b6040516104529190611797565b60405180910390f35b61047560048036038101906104709190611741565b61103f565b6040516104829190611797565b60405180910390f35b6104a560048036038101906104a09190611bcc565b611114565b005b6104c160048036038101906104bc9190611741565b611198565b6040516104ce9190611797565b60405180910390f35b6104df61126d565b6040516104ec9190611970565b60405180910390f35b600b602052815f5260405f20602052805f5260405f205f91509150505481565b60045481565b6009602052815f5260405f20602052805f5260405f205f91509150505481565b610543611292565b808261054f9190611c24565b831015610591576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058890611cbf565b60405180910390fd5b8260048190555081600581905550806006819055507fffa5d47a3dc0ae3c9242533886ec124cc122c3cea9e90606b8dfebc7c0d980bb8383836040516105d993929190611cdd565b60405180910390a1505050565b6105ee611292565b6105f6611319565b565b6008602052815f5260405f20602052805f5260405f205f91509150505481565b60055481565b5f8060149054906101000a900460ff16905090565b61063b611292565b60018260ff1610158015610653575060038260ff1611155b610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068990611d5c565b60405180910390fd5b60405180604001604052808281526020016001151581525060075f8460ff1660ff1681526020019081526020015f205f820151815f01556020820151816001015f6101000a81548160ff0219169083151502179055509050508160ff167f0f89b64a11b8d6d575e62a5fdee89b3eb60db4ecfa9554234319323e58bf04c98260405161071e9190611797565b60405180910390a25050565b6007602052805f5260405f205f91509050805f015490806001015f9054906101000a900460ff16905082565b61075e611292565b6107675f61137a565b565b5f8060075f8560ff1660ff1681526020019081526020015f2090505f60085f8660ff1660ff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050816001015f9054906101000a900460ff1615806107f95750815f015442105b15610808575f92505050610867565b5f825f0154426108189190611d7a565b90505f60016006548361082b9190611dda565b6108359190611e0a565b90506005548111156108475760055490505b60055481846108569190611c24565b6108609190611dda565b9450505050505b92915050565b610875611292565b61087d61143b565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108ae61149d565b6108b66114ec565b60075f8260ff1660ff1681526020019081526020015f206001015f9054906101000a900460ff1661091c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091390611e87565b60405180910390fd5b5f610927823361103f565b90505f6109348333611198565b90505f82118061094357505f81115b610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097990611eef565b60405180910390fd5b5f821115610a3f5781600a5f8560ff1660ff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546109eb9190611e0a565b92505081905550610a3e338360025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115369092919063ffffffff16565b5b5f811115610afc5780600b5f8560ff1660ff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610aa89190611e0a565b92505081905550610afb338260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115369092919063ffffffff16565b5b8260ff163373ffffffffffffffffffffffffffffffffffffffff167f8d2dd554e7207f2edcec3f94a370536aa5b74554b28e814f77ec34780a1855248484604051610b48929190611f0d565b60405180910390a35050610b5a6115b5565b50565b60065481565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8060075f8560ff1660ff1681526020019081526020015f2090505f60095f8660ff1660ff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050816001015f9054906101000a900460ff161580610c185750815f015442105b15610c27575f92505050610c86565b5f825f015442610c379190611d7a565b90505f600160065483610c4a9190611dda565b610c549190611e0a565b9050600554811115610c665760055490505b6005548184610c759190611c24565b610c7f9190611dda565b9450505050505b92915050565b610c94611292565b60075f8860ff1660ff1681526020019081526020015f206001015f9054906101000a900460ff16610cfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf190611e87565b60405180910390fd5b838390508686905014610d42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3990611f7e565b60405180910390fd5b818190508686905014610d8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8190611f7e565b60405180910390fd5b5f5b86869050811015610ed257848482818110610daa57610da9611f9c565b5b9050602002013560085f8a60ff1660ff1681526020019081526020015f205f898985818110610ddc57610ddb611f9c565b5b9050602002016020810190610df19190611bcc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550828282818110610e4157610e40611f9c565b5b9050602002013560095f8a60ff1660ff1681526020019081526020015f205f898985818110610e7357610e72611f9c565b5b9050602002016020810190610e889190611bcc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508080600101915050610d8c565b508660ff167f01a1b48a87abfee2225b09e7a0dd5ffec0db5ddd6c55c3faf61424d3f39b566787879050604051610f099190611797565b60405180910390a250505050505050565b610f22611292565b8160025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0b1186973f810894b87ab0bfbee422fddcaad21b46dc705a561451bbb6bac1178282604051610fd3929190611fc9565b60405180910390a15050565b610fe7611292565b610fef6114ec565b61101a82828573ffffffffffffffffffffffffffffffffffffffff166115369092919063ffffffff16565b505050565b600a602052815f5260405f20602052805f5260405f205f91509150505481565b5f8061104b8484610769565b9050600a5f8560ff1660ff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205481116110ac575f61110b565b600a5f8560ff1660ff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20548161110a9190611d7a565b5b91505092915050565b61111c611292565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361118c575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161118391906118fc565b60405180910390fd5b6111958161137a565b50565b5f806111a48484610b88565b9050600b5f8560ff1660ff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20548111611205575f611264565b600b5f8560ff1660ff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054816112639190611d7a565b5b91505092915050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61129a6115be565b73ffffffffffffffffffffffffffffffffffffffff166112b861087f565b73ffffffffffffffffffffffffffffffffffffffff1614611317576112db6115be565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161130e91906118fc565b60405180910390fd5b565b6113216115c5565b5f8060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6113636115be565b60405161137091906118fc565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6114436114ec565b60015f60146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114866115be565b60405161149391906118fc565b60405180910390a1565b6002600154036114e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d99061203a565b60405180910390fd5b6002600181905550565b6114f461061e565b15611534576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152b906120a2565b60405180910390fd5b565b6115b0838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016115699291906120c0565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061160e565b505050565b60018081905550565b5f33905090565b6115cd61061e565b61160c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160390612131565b60405180910390fd5b565b5f8060205f8451602086015f885af18061162d576040513d5f823e3d81fd5b3d92505f519150505f8214611646576001811415611661565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b156116a357836040517f5274afe700000000000000000000000000000000000000000000000000000000815260040161169a91906118fc565b60405180910390fd5b50505050565b5f80fd5b5f80fd5b5f60ff82169050919050565b6116c6816116b1565b81146116d0575f80fd5b50565b5f813590506116e1816116bd565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611710826116e7565b9050919050565b61172081611706565b811461172a575f80fd5b50565b5f8135905061173b81611717565b92915050565b5f8060408385031215611757576117566116a9565b5b5f611764858286016116d3565b92505060206117758582860161172d565b9150509250929050565b5f819050919050565b6117918161177f565b82525050565b5f6020820190506117aa5f830184611788565b92915050565b6117b98161177f565b81146117c3575f80fd5b50565b5f813590506117d4816117b0565b92915050565b5f805f606084860312156117f1576117f06116a9565b5b5f6117fe868287016117c6565b935050602061180f868287016117c6565b9250506040611820868287016117c6565b9150509250925092565b5f8115159050919050565b61183e8161182a565b82525050565b5f6020820190506118575f830184611835565b92915050565b5f8060408385031215611873576118726116a9565b5b5f611880858286016116d3565b9250506020611891858286016117c6565b9150509250929050565b5f602082840312156118b0576118af6116a9565b5b5f6118bd848285016116d3565b91505092915050565b5f6040820190506118d95f830185611788565b6118e66020830184611835565b9392505050565b6118f681611706565b82525050565b5f60208201905061190f5f8301846118ed565b92915050565b5f819050919050565b5f61193861193361192e846116e7565b611915565b6116e7565b9050919050565b5f6119498261191e565b9050919050565b5f61195a8261193f565b9050919050565b61196a81611950565b82525050565b5f6020820190506119835f830184611961565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126119aa576119a9611989565b5b8235905067ffffffffffffffff8111156119c7576119c661198d565b5b6020830191508360208202830111156119e3576119e2611991565b5b9250929050565b5f8083601f8401126119ff576119fe611989565b5b8235905067ffffffffffffffff811115611a1c57611a1b61198d565b5b602083019150836020820283011115611a3857611a37611991565b5b9250929050565b5f805f805f805f6080888a031215611a5a57611a596116a9565b5b5f611a678a828b016116d3565b975050602088013567ffffffffffffffff811115611a8857611a876116ad565b5b611a948a828b01611995565b9650965050604088013567ffffffffffffffff811115611ab757611ab66116ad565b5b611ac38a828b016119ea565b9450945050606088013567ffffffffffffffff811115611ae657611ae56116ad565b5b611af28a828b016119ea565b925092505092959891949750929550565b5f611b0d82611706565b9050919050565b611b1d81611b03565b8114611b27575f80fd5b50565b5f81359050611b3881611b14565b92915050565b5f8060408385031215611b5457611b536116a9565b5b5f611b6185828601611b2a565b9250506020611b7285828601611b2a565b9150509250929050565b5f805f60608486031215611b9357611b926116a9565b5b5f611ba086828701611b2a565b9350506020611bb18682870161172d565b9250506040611bc2868287016117c6565b9150509250925092565b5f60208284031215611be157611be06116a9565b5b5f611bee8482850161172d565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611c2e8261177f565b9150611c398361177f565b9250828202611c478161177f565b91508282048414831517611c5e57611c5d611bf7565b5b5092915050565b5f82825260208201905092915050565b7f4475726174696f6e20746f6f2073686f727400000000000000000000000000005f82015250565b5f611ca9601283611c65565b9150611cb482611c75565b602082019050919050565b5f6020820190508181035f830152611cd681611c9d565b9050919050565b5f606082019050611cf05f830186611788565b611cfd6020830185611788565b611d0a6040830184611788565b949350505050565b7f496e76616c6964207068617365000000000000000000000000000000000000005f82015250565b5f611d46600d83611c65565b9150611d5182611d12565b602082019050919050565b5f6020820190508181035f830152611d7381611d3a565b9050919050565b5f611d848261177f565b9150611d8f8361177f565b9250828203905081811115611da757611da6611bf7565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611de48261177f565b9150611def8361177f565b925082611dff57611dfe611dad565b5b828204905092915050565b5f611e148261177f565b9150611e1f8361177f565b9250828201905080821115611e3757611e36611bf7565b5b92915050565b7f5068617365206e6f7420636f6e666967757265640000000000000000000000005f82015250565b5f611e71601483611c65565b9150611e7c82611e3d565b602082019050919050565b5f6020820190508181035f830152611e9e81611e65565b9050919050565b7f4e6f7468696e6720746f20636c61696d000000000000000000000000000000005f82015250565b5f611ed9601083611c65565b9150611ee482611ea5565b602082019050919050565b5f6020820190508181035f830152611f0681611ecd565b9050919050565b5f604082019050611f205f830185611788565b611f2d6020830184611788565b9392505050565b7f4c656e677468206d69736d6174636800000000000000000000000000000000005f82015250565b5f611f68600f83611c65565b9150611f7382611f34565b602082019050919050565b5f6020820190508181035f830152611f9581611f5c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f604082019050611fdc5f8301856118ed565b611fe960208301846118ed565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f612024601f83611c65565b915061202f82611ff0565b602082019050919050565b5f6020820190508181035f83015261205181612018565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f61208c601083611c65565b915061209782612058565b602082019050919050565b5f6020820190508181035f8301526120b981612080565b9050919050565b5f6040820190506120d35f8301856118ed565b6120e06020830184611788565b9392505050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f61211b601483611c65565b9150612126826120e7565b602082019050919050565b5f6020820190508181035f8301526121488161210f565b905091905056fea2646970667358221220130e73db70dab707b19c32039474a416767fa51ebd652e4f5978a0dce313d43c64736f6c634300081a0033
Verified Source Code Full Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: No
staking.sol 156 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract VestingPeiro is Ownable(msg.sender), Pausable, ReentrancyGuard {
using SafeERC20 for IERC20;
IERC20 public token;
IERC20 public tokenUSDT;
uint256 public vestingDuration;
uint256 public trancheCount;
uint256 public trancheDuration;
struct Phase {
uint256 dropTime;
bool exists;
}
mapping(uint8 => Phase) public phases;
mapping(uint8 => mapping(address => uint256)) public allocations;
mapping(uint8 => mapping(address => uint256)) public allocationsUSDT;
mapping(uint8 => mapping(address => uint256)) public claimed;
mapping(uint8 => mapping(address => uint256)) public claimedUSDT;
event TokenUpdated(address newToken, address tokenUSDT);
event VestingParamsUpdated(uint256 duration, uint256 count, uint256 interval);
event PhaseConfigured(uint8 indexed phaseId, uint256 dropTime);
event RecipientsSet(uint8 indexed phaseId, uint256 totalRecipients);
event Claimed(address indexed user, uint8 indexed phaseId, uint256 amount, uint256 amountUSDT);
constructor(IERC20 _token, IERC20 _tokenUSDT) {
token = _token;
tokenUSDT = _tokenUSDT;
vestingDuration = 150 days;
trancheCount = 5;
trancheDuration = 30 days;
}
function pause() external onlyOwner {
_pause();
}
function unpause() external onlyOwner {
_unpause();
}
function setTokens(IERC20 _token, IERC20 _tokenUSDT) external onlyOwner {
token = _token;
tokenUSDT = _tokenUSDT;
emit TokenUpdated(address(_token), address(_tokenUSDT));
}
function setVestingParams(uint256 _duration, uint256 _count, uint256 _interval) external onlyOwner {
require(_duration >= _count * _interval, "Duration too short");
vestingDuration = _duration;
trancheCount = _count;
trancheDuration = _interval;
emit VestingParamsUpdated(_duration, _count, _interval);
}
function configurePhase(uint8 phaseId, uint256 dropTime) external onlyOwner {
require(phaseId >= 1 && phaseId <= 3, "Invalid phase");
phases[phaseId] = Phase({dropTime: dropTime, exists: true});
emit PhaseConfigured(phaseId, dropTime);
}
function setRecipients(
uint8 phaseId,
address[] calldata recipients,
uint256[] calldata amounts,
uint256[] calldata amountsUSDT
) external onlyOwner {
require(phases[phaseId].exists, "Phase not configured");
require(recipients.length == amounts.length, "Length mismatch");
require(recipients.length == amountsUSDT.length, "Length mismatch");
for (uint256 i = 0; i < recipients.length; i++) {
allocations[phaseId][recipients[i]] = amounts[i];
allocationsUSDT[phaseId][recipients[i]] = amountsUSDT[i];
}
emit RecipientsSet(phaseId, recipients.length);
}
function rescueTokens(
IERC20 _token,
address to,
uint256 amount
) external onlyOwner whenNotPaused {
_token.safeTransfer(to, amount);
}
function vestedAmount(uint8 phaseId, address user) public view returns (uint256) {
Phase storage ph = phases[phaseId];
uint256 alloc = allocations[phaseId][user];
if (!ph.exists || block.timestamp < ph.dropTime) {
return 0;
}
uint256 elapsed = block.timestamp - ph.dropTime;
uint256 tranches = (elapsed / trancheDuration) + 1;
if (tranches > trancheCount) {
tranches = trancheCount;
}
return (alloc * tranches) / trancheCount;
}
function claimable(uint8 phaseId, address user) public view returns (uint256) {
uint256 vested = vestedAmount(phaseId, user);
return vested > claimed[phaseId][user] ? (vested - claimed[phaseId][user]) : 0;
}
function vestedAmountUSDT(uint8 phaseId, address user) public view returns (uint256) {
Phase storage ph = phases[phaseId];
uint256 alloc = allocationsUSDT[phaseId][user];
if (!ph.exists || block.timestamp < ph.dropTime) {
return 0;
}
uint256 elapsed = block.timestamp - ph.dropTime;
uint256 tranches = (elapsed / trancheDuration) + 1;
if (tranches > trancheCount) {
tranches = trancheCount;
}
return (alloc * tranches) / trancheCount;
}
function claimableUSDT(uint8 phaseId, address user) public view returns (uint256) {
uint256 vested = vestedAmountUSDT(phaseId, user);
return vested > claimedUSDT[phaseId][user] ? (vested - claimedUSDT[phaseId][user]) : 0;
}
function claim(uint8 phaseId) external nonReentrant whenNotPaused {
require(phases[phaseId].exists, "Phase not configured");
uint256 amountToken = claimable(phaseId, msg.sender);
uint256 amountUSDT = claimableUSDT(phaseId, msg.sender);
require(amountToken > 0 || amountUSDT > 0, "Nothing to claim");
if (amountToken > 0) {
claimed[phaseId][msg.sender] += amountToken;
token.safeTransfer(msg.sender, amountToken);
}
if (amountUSDT > 0) {
claimedUSDT[phaseId][msg.sender] += amountUSDT;
tokenUSDT.safeTransfer(msg.sender, amountUSDT);
}
emit Claimed(msg.sender, phaseId, amountToken, amountUSDT);
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
SafeERC20.sol 212 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}
ReentrancyGuard.sol 77 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
Pausable.sol 105 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IERC1363.sol 86 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
IERC165.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";
IERC20.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
Read Contract
allocations 0x40792133 → uint256
allocationsUSDT 0x1fabdd0c → uint256
claimable 0xebde5e5d → uint256
claimableUSDT 0xf3d8e190 → uint256
claimed 0xd07e5d88 → uint256
claimedUSDT 0x065af3d4 → uint256
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
phases 0x69eee005 → uint256, bool
token 0xfc0c546a → address
tokenUSDT 0x99c5c8aa → address
trancheCount 0x59eb8224 → uint256
trancheDuration 0x9811a8e5 → uint256
vestedAmount 0x768c5ebf → uint256
vestedAmountUSDT 0xa39b6d5f → uint256
vestingDuration 0x1514617e → uint256
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
claim 0x95d4063f
uint8 phaseId
configurePhase 0x68e8c989
uint8 phaseId
uint256 dropTime
pause 0x8456cb59
No parameters
renounceOwnership 0x715018a6
No parameters
rescueTokens 0xcea9d26f
address _token
address to
uint256 amount
setRecipients 0xb519b038
uint8 phaseId
address[] recipients
uint256[] amounts
uint256[] amountsUSDT
setTokens 0xcbc7854e
address _token
address _tokenUSDT
setVestingParams 0x2b2f4d84
uint256 _duration
uint256 _count
uint256 _interval
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address