Latest 25 from a total of 6,595 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim Airdrop | 29829482 | 189 days ago | IN | 0 ETH | 0.00000077 | ||||
| Claim Airdrop | 29828342 | 189 days ago | IN | 0 ETH | 0.00000117 | ||||
| Claim Airdrop | 29824716 | 190 days ago | IN | 0 ETH | 0.00000049 | ||||
| Claim Airdrop | 29824327 | 190 days ago | IN | 0 ETH | 0.00000039 | ||||
| Claim Airdrop | 29824297 | 190 days ago | IN | 0 ETH | 0.00000038 | ||||
| Claim Airdrop An... | 29744263 | 191 days ago | IN | 0 ETH | 0.00000082 | ||||
| Claim Airdrop An... | 29736787 | 192 days ago | IN | 0 ETH | 0.00000037 | ||||
| Claim Airdrop | 29703415 | 192 days ago | IN | 0 ETH | 0.00000545 | ||||
| Claim Airdrop | 29699558 | 192 days ago | IN | 0 ETH | 0.00000136 | ||||
| Claim Airdrop | 29697794 | 192 days ago | IN | 0 ETH | 0.0000009 | ||||
| Claim Airdrop | 29687964 | 193 days ago | IN | 0 ETH | 0.00000066 | ||||
| Claim Airdrop | 29684267 | 193 days ago | IN | 0 ETH | 0.00000067 | ||||
| Claim Airdrop | 29684161 | 193 days ago | IN | 0 ETH | 0.00000082 | ||||
| Claim Airdrop | 29684075 | 193 days ago | IN | 0 ETH | 0.00000084 | ||||
| Claim Airdrop | 29684017 | 193 days ago | IN | 0 ETH | 0.00000077 | ||||
| Claim Airdrop | 29680439 | 193 days ago | IN | 0 ETH | 0.00000217 | ||||
| Claim Airdrop | 29678812 | 193 days ago | IN | 0 ETH | 0.00000048 | ||||
| Claim Airdrop An... | 29678637 | 193 days ago | IN | 0 ETH | 0.00000106 | ||||
| Claim Airdrop | 29678267 | 193 days ago | IN | 0 ETH | 0.00000034 | ||||
| Claim Airdrop | 29678222 | 193 days ago | IN | 0 ETH | 0.00000035 | ||||
| Claim Airdrop | 29672079 | 193 days ago | IN | 0 ETH | 0.00000222 | ||||
| Claim Airdrop | 29668313 | 193 days ago | IN | 0 ETH | 0.0000006 | ||||
| Claim Airdrop | 29665541 | 193 days ago | IN | 0 ETH | 0.00000226 | ||||
| Claim Airdrop | 29663912 | 193 days ago | IN | 0 ETH | 0.00000415 | ||||
| Claim Airdrop | 29663564 | 193 days ago | IN | 0 ETH | 0.00000494 |
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28115378 | 229 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EdgeAirdrop
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 10000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { DefinitiveConstants } from "../utils/DefinitiveConstants.sol";
import { DefinitiveErrors } from "../utils/DefinitiveErrors.sol";
import { DefinitiveEvents } from "../utils/DefinitiveEvents.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IEdgeAirdrop } from "./IEdgeAirdrop.sol";
import { IEdgeStaking } from "../Staking/IEdgeStaking.sol";
import { EdgeAirdropBase } from "./EdgeAirdropBase.sol";
contract EdgeAirdrop is EdgeAirdropBase {
constructor(address _airdropSigner) Ownable(DefinitiveConstants.MULTISIG_OWNER) {
airdropSigner = _airdropSigner;
}
function tokenAddress() public pure override returns (address) {
return DefinitiveConstants.DEFINITIVE_TOKEN;
}
function stakingAddress() public pure override returns (address) {
return DefinitiveConstants.EDGE_STAKING;
}
}// 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);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
library DefinitiveConstants {
address internal constant INITIAL_OWNER = 0xc9EC08483e198ad0751aCCDF4Ac4D124a16332b8;
address internal constant MULTISIG_OWNER = 0xF6BADe4Ef7a1887e09Fa5d86FdFf4B5fd1AeF071;
address internal constant DEFINITIVE_TOKEN = 0xED6E000dEF95780fb89734c07EE2ce9F6dcAf110;
address internal constant EDGE_STAKING = 0xdefed6eE363Cc984756566726073ed4d0BC68bde;
address internal constant STAGING_OWNER = 0xa85928c52Fc3C5d55D2914256372221576934885;
address internal constant DEFINITIVE_TOKEN_STAGING = 0xDA1cDf54bE4413DA03389d28AF8a4Cae3D8c217C;
address internal constant EDGE_STAKING_STAGING = 0x6a6691E679dD42447044f6B965976CA0a9f3Fed6;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
library DefinitiveErrors {
error Unauthorized(address sender);
error InsufficientStakedAmount(address user, uint256 requested, uint256 available);
error NoUnstakeRequestFound(address user);
error UnstakeTimelockActive(address user, uint256 timelockStart, uint256 unlockTime, uint256 currentTime);
error UnstakeRequestExpired(address user, uint256 timelockStart, uint256 expiryTime, uint256 currentTime);
// Added errors from EdgeAirdrop
error AirdropNotActive();
error ClaimAmountAlreadyFulfilled();
error SenderNotRecipient();
error InvalidSignature();
error DeadlineExceeded();
error InvalidChainID();
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
library DefinitiveEvents {
event Staked(address indexed sponsor, address indexed user, uint256 amount);
event UnstakeStarted(address indexed user, uint256 amount);
event UnstakeCompleted(address indexed user, uint256 amount);
// Added events from EdgeAirdrop
event AirdropClaimed(bytes32 orgID, uint256 claimAmount, address recipient);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
pragma solidity ^0.8.20;
import {Strings} from "../Strings.sol";
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(hex"19_00", validator, data));
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, hex"19_01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IEdgeAirdrop {
struct AirdropClaimData {
bytes32 orgID;
uint256 claimAmount;
address receipt;
uint256 chainID;
uint256 deadline;
}
function startAirdrop() external;
function stopAirdrop() external;
function updateAirdropSigner(address newSigner) external;
function claimAirdrop(AirdropClaimData calldata claimData, bytes calldata signedMessage) external;
function claimAirdropAndStake(AirdropClaimData calldata claimData, bytes calldata signedMessage) external;
function withdrawRemainingEdge() external;
function isAirdropActive() external view returns (bool);
function orgToClaimedAmount(bytes32 orgID) external view returns (uint256);
function tokenAddress() external pure returns (address);
function stakingAddress() external pure returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IEdgeStaking {
struct StakeState {
uint256 stakedAmount;
uint256 pendingUnstake;
uint256 startedUnstakeTimestamp;
}
function stake(uint256 amount) external;
function stakeOnBehalf(address user, uint256 amount) external;
function startUnstake(uint256 amount) external;
function finishUnstake() external;
function stakedAmount(address user) external view returns (uint256);
function stakeState(address user) external view returns (StakeState memory);
function getUserStakeState(address user)
external
view
returns (
StakeState memory,
bool redeemable,
bool expired,
uint256 timeLeftUntilRedeemable,
uint256 timeLeftToClaim
);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { DefinitiveConstants } from "../utils/DefinitiveConstants.sol";
import { DefinitiveErrors } from "../utils/DefinitiveErrors.sol";
import { DefinitiveEvents } from "../utils/DefinitiveEvents.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IEdgeAirdrop } from "./IEdgeAirdrop.sol";
import { IEdgeStaking } from "../Staking/IEdgeStaking.sol";
abstract contract EdgeAirdropBase is Ownable, IEdgeAirdrop {
bool public override isAirdropActive;
address internal airdropSigner;
mapping(bytes32 => uint256) public override orgToClaimedAmount;
modifier onlyAirdropActive() {
if (!isAirdropActive) {
revert DefinitiveErrors.AirdropNotActive();
}
_;
}
function startAirdrop() external override onlyOwner {
isAirdropActive = true;
}
function stopAirdrop() external override onlyOwner {
isAirdropActive = false;
}
function updateAirdropSigner(address _airdropSigner) external override onlyOwner {
airdropSigner = _airdropSigner;
}
function claimAirdrop(
AirdropClaimData calldata claimData,
bytes calldata signedMessage
)
external
override
onlyAirdropActive
{
uint256 sendAmount = _validateAndSetClaimData(claimData, signedMessage);
IERC20(tokenAddress()).transfer(claimData.receipt, sendAmount);
emit DefinitiveEvents.AirdropClaimed(claimData.orgID, claimData.claimAmount, claimData.receipt);
}
function claimAirdropAndStake(
AirdropClaimData calldata claimData,
bytes calldata signedMessage
)
external
override
onlyAirdropActive
{
uint256 sendAmount = _validateAndSetClaimData(claimData, signedMessage);
IERC20(tokenAddress()).approve(stakingAddress(), sendAmount);
IEdgeStaking(stakingAddress()).stakeOnBehalf(claimData.receipt, sendAmount);
emit DefinitiveEvents.AirdropClaimed(claimData.orgID, claimData.claimAmount, claimData.receipt);
}
function withdrawRemainingEdge() external override onlyOwner {
uint256 remainingEdge = IERC20(tokenAddress()).balanceOf(address(this));
IERC20(tokenAddress()).transfer(msg.sender, remainingEdge);
}
function _validateAndSetClaimData(
AirdropClaimData calldata claimData,
bytes calldata signedMessage
)
internal
returns (uint256 sendAmount)
{
if (msg.sender != claimData.receipt) {
revert DefinitiveErrors.SenderNotRecipient();
}
// Validate deadline
if (block.timestamp > claimData.deadline) {
revert DefinitiveErrors.DeadlineExceeded();
}
// Validate chainID
if (block.chainid != claimData.chainID) {
revert DefinitiveErrors.InvalidChainID();
}
uint256 alreadyClaimed = orgToClaimedAmount[claimData.orgID];
if (alreadyClaimed >= claimData.claimAmount) {
revert DefinitiveErrors.ClaimAmountAlreadyFulfilled();
}
sendAmount = claimData.claimAmount - alreadyClaimed;
orgToClaimedAmount[claimData.orgID] = claimData.claimAmount;
bytes32 hash = keccak256(abi.encode(claimData));
bytes32 messageHash = MessageHashUtils.toEthSignedMessageHash(hash);
if (ECDSA.recover(messageHash, signedMessage) != airdropSigner) {
revert DefinitiveErrors.InvalidSignature();
}
return sendAmount;
}
function tokenAddress() public pure virtual override returns (address);
function stakingAddress() public pure virtual override returns (address);
}// 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}{
"remappings": [
"@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.0.2/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.0.2/",
"forge-std/=dependencies/forge-std-1.9.6/src/",
"openzeppelin-foundry-upgrades/=dependencies/openzeppelin-foundry-upgrades-0.4.0/src/",
"safe-singleton-deployer-sol/=dependencies/safe-singleton-deployer-sol-1.0.0/",
"@openzeppelin-contracts-5.0.2/=dependencies/@openzeppelin-contracts-5.0.2/",
"@openzeppelin-contracts-upgradeable-5.0.2/=dependencies/@openzeppelin-contracts-upgradeable-5.0.2/",
"forge-std-1.9.6/=dependencies/forge-std-1.9.6/src/",
"openzeppelin-foundry-upgrades-0.4.0/=dependencies/openzeppelin-foundry-upgrades-0.4.0/src/",
"safe-singleton-deployer-sol-1.0.0/=dependencies/safe-singleton-deployer-sol-1.0.0/src/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_airdropSigner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AirdropNotActive","type":"error"},{"inputs":[],"name":"ClaimAmountAlreadyFulfilled","type":"error"},{"inputs":[],"name":"DeadlineExceeded","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"InvalidChainID","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"SenderNotRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"orgID","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"claimAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"AirdropClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"bytes32","name":"orgID","type":"bytes32"},{"internalType":"uint256","name":"claimAmount","type":"uint256"},{"internalType":"address","name":"receipt","type":"address"},{"internalType":"uint256","name":"chainID","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct IEdgeAirdrop.AirdropClaimData","name":"claimData","type":"tuple"},{"internalType":"bytes","name":"signedMessage","type":"bytes"}],"name":"claimAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"orgID","type":"bytes32"},{"internalType":"uint256","name":"claimAmount","type":"uint256"},{"internalType":"address","name":"receipt","type":"address"},{"internalType":"uint256","name":"chainID","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct IEdgeAirdrop.AirdropClaimData","name":"claimData","type":"tuple"},{"internalType":"bytes","name":"signedMessage","type":"bytes"}],"name":"claimAirdropAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAirdropActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"orgToClaimedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"startAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_airdropSigner","type":"address"}],"name":"updateAirdropSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRemainingEdge","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b506040516110f53803806110f583398101604081905261002e916100c1565b73f6bade4ef7a1887e09fa5d86fdff4b5fd1aef07161004c81610072565b50600180546001600160a01b0319166001600160a01b03929092169190911790556100ee565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100d1575f80fd5b81516001600160a01b03811681146100e7575f80fd5b9392505050565b610ffa806100fb5f395ff3fe608060405234801561000f575f80fd5b50600436106100da575f3560e01c806391ab91b311610088578063d7b4be2411610063578063d7b4be24146101bb578063d8ff3830146101d5578063e20d810f146101dd578063f2fde38b14610211575f80fd5b806391ab91b3146101865780639d76ea5814610199578063d2a569c3146101b3575f80fd5b8063715018a6116100b8578063715018a61461012d5780638da5cb5b14610135578063906e08b414610173575f80fd5b80630a509f6c146100de5780632147b974146101105780634f4e47f114610125575b5f80fd5b6100fd6100ec366004610e1d565b60026020525f908152604090205481565b6040519081526020015b60405180910390f35b61012361011e366004610e34565b610224565b005b6101236103b5565b6101236103e6565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610107565b610123610181366004610edf565b6103f9565b610123610194366004610e34565b610448565b73ed6e000def95780fb89734c07ee2ce9f6dcaf11061014e565b610123610666565b73defed6ee363cc984756566726073ed4d0bc68bde61014e565b6101236106ae565b5f546102019074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610107565b61012361021f366004610edf565b61080b565b5f5474010000000000000000000000000000000000000000900460ff16610277576040517ff119543800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610283848484610873565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf11063a9059cbb6102af6060870160408801610edf565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303815f875af115801561031e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103429190610eff565b507fee16fba7fb8afbf690e0080de8f9dfe2b1e3a8847fcba4bb409689c1f3fb0f198435602086013561037b6060880160408901610edf565b60408051938452602084019290925273ffffffffffffffffffffffffffffffffffffffff169082015260600160405180910390a150505050565b6103bd610aee565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6103ee610aee565b6103f75f610b40565b565b610401610aee565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f5474010000000000000000000000000000000000000000900460ff1661049b576040517ff119543800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6104a7848484610873565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf11073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373defed6ee363cc984756566726073ed4d0bc68bde6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303815f875af115801561055d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105819190610eff565b5073defed6ee363cc984756566726073ed4d0bc68bde63460b5ee26105ac6060870160408801610edf565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044015f604051808303815f87803b158015610616575f80fd5b505af1158015610628573d5f803e3d5ffd5b507fee16fba7fb8afbf690e0080de8f9dfe2b1e3a8847fcba4bb409689c1f3fb0f1992505085359050602086013561037b6060880160408901610edf565b61066e610aee565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6106b6610aee565b5f73ed6e000def95780fb89734c07ee2ce9f6dcaf1106040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610736573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075a9190610f1e565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf1106040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff919091169063a9059cbb906044016020604051808303815f875af11580156107e3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108079190610eff565b5050565b610813610aee565b73ffffffffffffffffffffffffffffffffffffffff8116610867576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61087081610b40565b50565b5f6108846060850160408601610edf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f6027790000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360800135421115610926576040517f559895a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83606001354614610963576040517f86d846fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83355f908152600260209081526040909120549085013581106109b2576040517f9de9209900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109c0816020870135610f35565b85355f908152600260209081526040808320828a013590555192945090916109ea91889101610f6d565b6040516020818303038152906040528051906020012090505f610a39827f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c91909152603c902090565b600154604080516020601f8a0181900481028201810190925288815292935073ffffffffffffffffffffffffffffffffffffffff90911691610a97918491908a908a90819084018382808284375f92019190915250610bb492505050565b73ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050509392505050565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146103f7576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161085e565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f805f80610bc28686610bde565b925092509250610bd28282610c27565b50909150505b92915050565b5f805f8351604103610c15576020840151604085015160608601515f1a610c0788828585610d2a565b955095509550505050610c20565b505081515f91506002905b9250925092565b5f826003811115610c3a57610c3a610fc0565b03610c43575050565b6001826003811115610c5757610c57610fc0565b03610c8e576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610ca257610ca2610fc0565b03610cdc576040517ffce698f70000000000000000000000000000000000000000000000000000000081526004810182905260240161085e565b6003826003811115610cf057610cf0610fc0565b03610807576040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004810182905260240161085e565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610d6357505f91506003905082610e13565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610db4573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610e0a57505f925060019150829050610e13565b92505f91508190505b9450945094915050565b5f60208284031215610e2d575f80fd5b5035919050565b5f805f83850360c0811215610e47575f80fd5b60a0811215610e54575f80fd5b5083925060a084013567ffffffffffffffff80821115610e72575f80fd5b818601915086601f830112610e85575f80fd5b813581811115610e93575f80fd5b876020828501011115610ea4575f80fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114610eda575f80fd5b919050565b5f60208284031215610eef575f80fd5b610ef882610eb7565b9392505050565b5f60208284031215610f0f575f80fd5b81518015158114610ef8575f80fd5b5f60208284031215610f2e575f80fd5b5051919050565b81810381811115610bd8577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b813581526020808301359082015260a0810173ffffffffffffffffffffffffffffffffffffffff610fa060408501610eb7565b166040830152606083013560608301526080830135608083015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffdfea164736f6c6343000819000a00000000000000000000000081777bfcdd66b95c9f49b3ec46d190aecd83d2fe
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100da575f3560e01c806391ab91b311610088578063d7b4be2411610063578063d7b4be24146101bb578063d8ff3830146101d5578063e20d810f146101dd578063f2fde38b14610211575f80fd5b806391ab91b3146101865780639d76ea5814610199578063d2a569c3146101b3575f80fd5b8063715018a6116100b8578063715018a61461012d5780638da5cb5b14610135578063906e08b414610173575f80fd5b80630a509f6c146100de5780632147b974146101105780634f4e47f114610125575b5f80fd5b6100fd6100ec366004610e1d565b60026020525f908152604090205481565b6040519081526020015b60405180910390f35b61012361011e366004610e34565b610224565b005b6101236103b5565b6101236103e6565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610107565b610123610181366004610edf565b6103f9565b610123610194366004610e34565b610448565b73ed6e000def95780fb89734c07ee2ce9f6dcaf11061014e565b610123610666565b73defed6ee363cc984756566726073ed4d0bc68bde61014e565b6101236106ae565b5f546102019074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610107565b61012361021f366004610edf565b61080b565b5f5474010000000000000000000000000000000000000000900460ff16610277576040517ff119543800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610283848484610873565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf11063a9059cbb6102af6060870160408801610edf565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303815f875af115801561031e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103429190610eff565b507fee16fba7fb8afbf690e0080de8f9dfe2b1e3a8847fcba4bb409689c1f3fb0f198435602086013561037b6060880160408901610edf565b60408051938452602084019290925273ffffffffffffffffffffffffffffffffffffffff169082015260600160405180910390a150505050565b6103bd610aee565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b6103ee610aee565b6103f75f610b40565b565b610401610aee565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5f5474010000000000000000000000000000000000000000900460ff1661049b576040517ff119543800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6104a7848484610873565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf11073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373defed6ee363cc984756566726073ed4d0bc68bde6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303815f875af115801561055d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105819190610eff565b5073defed6ee363cc984756566726073ed4d0bc68bde63460b5ee26105ac6060870160408801610edf565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044015f604051808303815f87803b158015610616575f80fd5b505af1158015610628573d5f803e3d5ffd5b507fee16fba7fb8afbf690e0080de8f9dfe2b1e3a8847fcba4bb409689c1f3fb0f1992505085359050602086013561037b6060880160408901610edf565b61066e610aee565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6106b6610aee565b5f73ed6e000def95780fb89734c07ee2ce9f6dcaf1106040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610736573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075a9190610f1e565b905073ed6e000def95780fb89734c07ee2ce9f6dcaf1106040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff919091169063a9059cbb906044016020604051808303815f875af11580156107e3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108079190610eff565b5050565b610813610aee565b73ffffffffffffffffffffffffffffffffffffffff8116610867576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61087081610b40565b50565b5f6108846060850160408601610edf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f6027790000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360800135421115610926576040517f559895a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83606001354614610963576040517f86d846fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83355f908152600260209081526040909120549085013581106109b2576040517f9de9209900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109c0816020870135610f35565b85355f908152600260209081526040808320828a013590555192945090916109ea91889101610f6d565b6040516020818303038152906040528051906020012090505f610a39827f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c91909152603c902090565b600154604080516020601f8a0181900481028201810190925288815292935073ffffffffffffffffffffffffffffffffffffffff90911691610a97918491908a908a90819084018382808284375f92019190915250610bb492505050565b73ffffffffffffffffffffffffffffffffffffffff1614610ae4576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050509392505050565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146103f7576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161085e565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f805f80610bc28686610bde565b925092509250610bd28282610c27565b50909150505b92915050565b5f805f8351604103610c15576020840151604085015160608601515f1a610c0788828585610d2a565b955095509550505050610c20565b505081515f91506002905b9250925092565b5f826003811115610c3a57610c3a610fc0565b03610c43575050565b6001826003811115610c5757610c57610fc0565b03610c8e576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610ca257610ca2610fc0565b03610cdc576040517ffce698f70000000000000000000000000000000000000000000000000000000081526004810182905260240161085e565b6003826003811115610cf057610cf0610fc0565b03610807576040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004810182905260240161085e565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610d6357505f91506003905082610e13565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610db4573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610e0a57505f925060019150829050610e13565b92505f91508190505b9450945094915050565b5f60208284031215610e2d575f80fd5b5035919050565b5f805f83850360c0811215610e47575f80fd5b60a0811215610e54575f80fd5b5083925060a084013567ffffffffffffffff80821115610e72575f80fd5b818601915086601f830112610e85575f80fd5b813581811115610e93575f80fd5b876020828501011115610ea4575f80fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114610eda575f80fd5b919050565b5f60208284031215610eef575f80fd5b610ef882610eb7565b9392505050565b5f60208284031215610f0f575f80fd5b81518015158114610ef8575f80fd5b5f60208284031215610f2e575f80fd5b5051919050565b81810381811115610bd8577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b813581526020808301359082015260a0810173ffffffffffffffffffffffffffffffffffffffff610fa060408501610eb7565b166040830152606083013560608301526080830135608083015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffdfea164736f6c6343000819000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000081777bfcdd66b95c9f49b3ec46d190aecd83d2fe
-----Decoded View---------------
Arg [0] : _airdropSigner (address): 0x81777BfCDd66B95C9F49B3ec46D190aEcD83d2FE
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000081777bfcdd66b95c9f49b3ec46d190aecd83d2fe
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.