Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 213 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 17125762 | 913 days ago | IN | 0 ETH | 0.00632822 | ||||
| Change Merkle Ro... | 17097055 | 917 days ago | IN | 0 ETH | 0.00159533 | ||||
| Change Merkle Ro... | 17074194 | 920 days ago | IN | 0 ETH | 0.0014503 | ||||
| Change Merkle Ro... | 17068823 | 921 days ago | IN | 0 ETH | 0.00107322 | ||||
| Claim | 17035594 | 926 days ago | IN | 0 ETH | 0.00505281 | ||||
| Change Merkle Ro... | 17018536 | 928 days ago | IN | 0 ETH | 0.00116024 | ||||
| Claim | 16941903 | 939 days ago | IN | 0 ETH | 0.00406484 | ||||
| Claim | 16935938 | 940 days ago | IN | 0 ETH | 0.0038424 | ||||
| Change Merkle Ro... | 16933211 | 940 days ago | IN | 0 ETH | 0.00093825 | ||||
| Claim | 16786396 | 961 days ago | IN | 0 ETH | 0.00603985 | ||||
| Claim | 16650209 | 980 days ago | IN | 0 ETH | 0.00699588 | ||||
| Claim | 16643535 | 981 days ago | IN | 0 ETH | 0.00692804 | ||||
| Claim | 16637496 | 982 days ago | IN | 0 ETH | 0.00561902 | ||||
| Claim | 16631962 | 983 days ago | IN | 0 ETH | 0.00324588 | ||||
| Change Merkle Ro... | 16628793 | 983 days ago | IN | 0 ETH | 0.00075415 | ||||
| Claim | 16621029 | 984 days ago | IN | 0 ETH | 0.00433511 | ||||
| Change Merkle Ro... | 16620951 | 984 days ago | IN | 0 ETH | 0.00110131 | ||||
| Claim | 16616538 | 985 days ago | IN | 0 ETH | 0.00264372 | ||||
| Claim | 16609109 | 986 days ago | IN | 0 ETH | 0.00208521 | ||||
| Change Merkle Ro... | 16587547 | 989 days ago | IN | 0 ETH | 0.00078316 | ||||
| Change Merkle Ro... | 16586156 | 989 days ago | IN | 0 ETH | 0.00116024 | ||||
| Change Merkle Ro... | 16586145 | 989 days ago | IN | 0 ETH | 0.00116024 | ||||
| Change Merkle Ro... | 16541770 | 995 days ago | IN | 0 ETH | 0.00087018 | ||||
| Claim | 16248581 | 1036 days ago | IN | 0 ETH | 0.0027897 | ||||
| Change Merkle Ro... | 16241419 | 1037 days ago | IN | 0 ETH | 0.00042704 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
GenesisKeyTeamDistributor
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "../interface/IGenesisKeyTeamDistributor.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// From: https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol
interface IGkTeam {
function teamClaim(address recipient) external returns (bool);
}
contract GenesisKeyTeamDistributor is IGenesisKeyTeamDistributor {
address public immutable override gkTeam;
bytes32 public override merkleRoot;
address public override owner;
// This is a packed array of booleans.
mapping(uint256 => uint256) private claimedBitMap;
mapping(address => bool) private addressClaimed;
constructor(address gkTeam_) {
gkTeam = gkTeam_;
owner = msg.sender;
}
function transferOwnership(address _newOwner) external {
require(msg.sender == owner, "!auth");
owner = _newOwner;
}
function changeMerkleRoot(bytes32 _newRoot) external {
require(msg.sender == owner, "!auth");
merkleRoot = _newRoot;
}
function claim(
uint256 index,
address account,
uint256 tokenId,
bytes32[] calldata merkleProof
) external payable override {
require(msg.sender == account);
require(!addressClaimed[account], "GKTeamDistributor: Drop already claimed.");
// Verify the merkle proof.
bytes32 node = keccak256(abi.encodePacked(index, account, tokenId));
require(MerkleProof.verify(merkleProof, merkleRoot, node), "GKTeamDistributor: Invalid proof.");
// Mark it claimed and send the token.
addressClaimed[account] = true;
require(IGkTeam(gkTeam).teamClaim(account), "GKTeamDistributor: No team keys available");
emit Claimed(index, account, tokenId);
}
}//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
// Allows anyone to claim a token if they exist in a merkle root.
interface IGenesisKeyTeamDistributor {
// Returns the address of the gkTeam contract.
function gkTeam() external view returns (address);
// Returns the merkle root of the merkle tree containing account balances available to claim.
function merkleRoot() external view returns (bytes32);
function owner() external view returns (address);
// Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
function claim(
uint256 index,
address account,
uint256 tokenId,
bytes32[] calldata merkleProof
) external payable;
// This event is triggered whenever a call to #claim succeeds.
event Claimed(uint256 index, address account, uint256 tokenId);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
// Check if the computed hash (root) is equal to the provided root
return computedHash == root;
}
}{
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 0
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"gkTeam_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Claimed","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_newRoot","type":"bytes32"}],"name":"changeMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gkTeam","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b5060405161077738038061077783398101604081905261002f91610058565b60601b6001600160601b03191660805260018054336001600160a01b0319909116179055610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160601c6106cb6100ac6000396000818160d701526102db01526106cb6000f3fe6080604052600436106100555760003560e01c80632e7ba6ef1461005a5780632eb4a7ab1461006f5780638da5cb5b14610098578063bc53d64e146100c5578063ebcea3db146100f9578063f2fde38b14610119575b600080fd5b61006d6100683660046105b6565b610139565b005b34801561007b57600080fd5b5061008560005481565b6040519081526020015b60405180910390f35b3480156100a457600080fd5b506001546100b8906001600160a01b031681565b60405161008f919061064c565b3480156100d157600080fd5b506100b87f000000000000000000000000000000000000000000000000000000000000000081565b34801561010557600080fd5b5061006d61011436600461059d565b610413565b34801561012557600080fd5b5061006d610134366004610559565b610442565b336001600160a01b0385161461014e57600080fd5b6001600160a01b03841660009081526003602052604090205460ff16156101cd5760405162461bcd60e51b815260206004820152602860248201527f474b5465616d4469737472696275746f723a2044726f7020616c72656164792060448201526731b630b4b6b2b21760c11b60648201526084015b60405180910390fd5b60408051602081018790526001600160601b0319606087901b169181019190915260548101849052600090607401604051602081830303815290604052805190602001209050610252838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054925085915061048e9050565b6102a85760405162461bcd60e51b815260206004820152602160248201527f474b5465616d4469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b60648201526084016101c4565b6001600160a01b0380861660009081526003602052604090819020805460ff191660011790555163e7db0be960e01b81527f00000000000000000000000000000000000000000000000000000000000000009091169063e7db0be99061031290889060040161064c565b602060405180830381600087803b15801561032c57600080fd5b505af1158015610340573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610364919061057b565b6103c25760405162461bcd60e51b815260206004820152602960248201527f474b5465616d4469737472696275746f723a204e6f207465616d206b65797320604482015268617661696c61626c6560b81b60648201526084016101c4565b604080518781526001600160a01b03871660208201529081018590527f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269060600160405180910390a1505050505050565b6001546001600160a01b0316331461043d5760405162461bcd60e51b81526004016101c490610660565b600055565b6001546001600160a01b0316331461046c5760405162461bcd60e51b81526004016101c490610660565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600081815b85518110156105325760008682815181106104b0576104b06106a8565b602002602001015190508083116104f257604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061051f565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061052a8161067f565b915050610493565b509092149392505050565b80356001600160a01b038116811461055457600080fd5b919050565b60006020828403121561056b57600080fd5b6105748261053d565b9392505050565b60006020828403121561058d57600080fd5b8151801515811461057457600080fd5b6000602082840312156105af57600080fd5b5035919050565b6000806000806000608086880312156105ce57600080fd5b853594506105de6020870161053d565b93506040860135925060608601356001600160401b038082111561060157600080fd5b818801915088601f83011261061557600080fd5b81358181111561062457600080fd5b8960208260051b850101111561063957600080fd5b9699959850939650602001949392505050565b6001600160a01b0391909116815260200190565b602080825260059082015264042c2eae8d60db1b604082015260600190565b60006000198214156106a157634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea164736f6c6343000806000a000000000000000000000000fc99e6b4447a17ea0c6162854fcb572ddc8fbb37
Deployed Bytecode
0x6080604052600436106100555760003560e01c80632e7ba6ef1461005a5780632eb4a7ab1461006f5780638da5cb5b14610098578063bc53d64e146100c5578063ebcea3db146100f9578063f2fde38b14610119575b600080fd5b61006d6100683660046105b6565b610139565b005b34801561007b57600080fd5b5061008560005481565b6040519081526020015b60405180910390f35b3480156100a457600080fd5b506001546100b8906001600160a01b031681565b60405161008f919061064c565b3480156100d157600080fd5b506100b87f000000000000000000000000fc99e6b4447a17ea0c6162854fcb572ddc8fbb3781565b34801561010557600080fd5b5061006d61011436600461059d565b610413565b34801561012557600080fd5b5061006d610134366004610559565b610442565b336001600160a01b0385161461014e57600080fd5b6001600160a01b03841660009081526003602052604090205460ff16156101cd5760405162461bcd60e51b815260206004820152602860248201527f474b5465616d4469737472696275746f723a2044726f7020616c72656164792060448201526731b630b4b6b2b21760c11b60648201526084015b60405180910390fd5b60408051602081018790526001600160601b0319606087901b169181019190915260548101849052600090607401604051602081830303815290604052805190602001209050610252838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054925085915061048e9050565b6102a85760405162461bcd60e51b815260206004820152602160248201527f474b5465616d4469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b60648201526084016101c4565b6001600160a01b0380861660009081526003602052604090819020805460ff191660011790555163e7db0be960e01b81527f000000000000000000000000fc99e6b4447a17ea0c6162854fcb572ddc8fbb379091169063e7db0be99061031290889060040161064c565b602060405180830381600087803b15801561032c57600080fd5b505af1158015610340573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610364919061057b565b6103c25760405162461bcd60e51b815260206004820152602960248201527f474b5465616d4469737472696275746f723a204e6f207465616d206b65797320604482015268617661696c61626c6560b81b60648201526084016101c4565b604080518781526001600160a01b03871660208201529081018590527f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269060600160405180910390a1505050505050565b6001546001600160a01b0316331461043d5760405162461bcd60e51b81526004016101c490610660565b600055565b6001546001600160a01b0316331461046c5760405162461bcd60e51b81526004016101c490610660565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600081815b85518110156105325760008682815181106104b0576104b06106a8565b602002602001015190508083116104f257604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061051f565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061052a8161067f565b915050610493565b509092149392505050565b80356001600160a01b038116811461055457600080fd5b919050565b60006020828403121561056b57600080fd5b6105748261053d565b9392505050565b60006020828403121561058d57600080fd5b8151801515811461057457600080fd5b6000602082840312156105af57600080fd5b5035919050565b6000806000806000608086880312156105ce57600080fd5b853594506105de6020870161053d565b93506040860135925060608601356001600160401b038082111561060157600080fd5b818801915088601f83011261061557600080fd5b81358181111561062457600080fd5b8960208260051b850101111561063957600080fd5b9699959850939650602001949392505050565b6001600160a01b0391909116815260200190565b602080825260059082015264042c2eae8d60db1b604082015260600190565b60006000198214156106a157634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea164736f6c6343000806000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fc99e6b4447a17ea0c6162854fcb572ddc8fbb37
-----Decoded View---------------
Arg [0] : gkTeam_ (address): 0xfc99E6b4447a17EA0C6162854fcb572ddC8FbB37
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc99e6b4447a17ea0c6162854fcb572ddc8fbb37
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.