| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| 0x9172ff7ac5536b9ba4c6ef87d0680cec6711bce0cec576c617d3dd82de08270d | Claim | (pending) | 4 days ago | IN | 0 ETH | (Pending) | |||
| Claim | 23743325 | 11 mins ago | IN | 0 ETH | 0.00005245 | ||||
| Claim And Stake | 23743219 | 33 mins ago | IN | 0 ETH | 0.00025601 | ||||
| Claim | 23743013 | 1 hr ago | IN | 0 ETH | 0.00016747 | ||||
| Claim And Stake | 23742964 | 1 hr ago | IN | 0 ETH | 0.00026465 | ||||
| Claim | 23742557 | 2 hrs ago | IN | 0 ETH | 0.00013231 | ||||
| Claim And Stake | 23741266 | 7 hrs ago | IN | 0 ETH | 0.00083753 | ||||
| Claim And Stake | 23741126 | 7 hrs ago | IN | 0 ETH | 0.00093618 | ||||
| Claim And Stake | 23741094 | 7 hrs ago | IN | 0 ETH | 0.00094836 | ||||
| Claim And Stake | 23741083 | 7 hrs ago | IN | 0 ETH | 0.00084359 | ||||
| Claim And Stake | 23740909 | 8 hrs ago | IN | 0 ETH | 0.00859212 | ||||
| Claim And Stake | 23738446 | 16 hrs ago | IN | 0 ETH | 0.00004499 | ||||
| Claim | 23737812 | 18 hrs ago | IN | 0 ETH | 0.00003342 | ||||
| Claim | 23737621 | 19 hrs ago | IN | 0 ETH | 0.00007082 | ||||
| Claim | 23737241 | 20 hrs ago | IN | 0 ETH | 0.00002061 | ||||
| Claim | 23735774 | 25 hrs ago | IN | 0 ETH | 0.00015629 | ||||
| Claim | 23735549 | 26 hrs ago | IN | 0 ETH | 0.00002873 | ||||
| Claim | 23734551 | 29 hrs ago | IN | 0 ETH | 0.00011962 | ||||
| Claim | 23734299 | 30 hrs ago | IN | 0 ETH | 0.00004937 | ||||
| Claim | 23734293 | 30 hrs ago | IN | 0 ETH | 0.00008796 | ||||
| Claim | 23734285 | 30 hrs ago | IN | 0 ETH | 0.00024967 | ||||
| Claim And Stake | 23732891 | 35 hrs ago | IN | 0 ETH | 0.00025706 | ||||
| Claim And Stake | 23732661 | 36 hrs ago | IN | 0 ETH | 0.00015393 | ||||
| Claim | 23732647 | 36 hrs ago | IN | 0 ETH | 0.00015973 | ||||
| Claim | 23732569 | 36 hrs ago | IN | 0 ETH | 0.00004154 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
|||
|---|---|---|---|---|---|---|---|---|
| Transfer | 23743325 | 11 mins ago | 0 ETH | |||||
| Deposit | 23743219 | 33 mins ago | 0 ETH | |||||
| Transfer | 23743013 | 1 hr ago | 0 ETH | |||||
| Deposit | 23742964 | 1 hr ago | 0 ETH | |||||
| Transfer | 23742557 | 2 hrs ago | 0 ETH | |||||
| Deposit | 23741266 | 7 hrs ago | 0 ETH | |||||
| Deposit | 23741126 | 7 hrs ago | 0 ETH | |||||
| Deposit | 23741094 | 7 hrs ago | 0 ETH | |||||
| Deposit | 23741083 | 7 hrs ago | 0 ETH | |||||
| Deposit | 23740909 | 8 hrs ago | 0 ETH | |||||
| Deposit | 23738446 | 16 hrs ago | 0 ETH | |||||
| Transfer | 23737812 | 18 hrs ago | 0 ETH | |||||
| Transfer | 23737621 | 19 hrs ago | 0 ETH | |||||
| Transfer | 23737241 | 20 hrs ago | 0 ETH | |||||
| Transfer | 23735774 | 25 hrs ago | 0 ETH | |||||
| Transfer | 23735549 | 26 hrs ago | 0 ETH | |||||
| Transfer | 23734551 | 29 hrs ago | 0 ETH | |||||
| Transfer | 23734293 | 30 hrs ago | 0 ETH | |||||
| Transfer | 23734285 | 30 hrs ago | 0 ETH | |||||
| Deposit | 23732891 | 35 hrs ago | 0 ETH | |||||
| Deposit | 23732661 | 36 hrs ago | 0 ETH | |||||
| Transfer | 23732647 | 36 hrs ago | 0 ETH | |||||
| Transfer | 23732569 | 36 hrs ago | 0 ETH | |||||
| Transfer | 23732036 | 38 hrs ago | 0 ETH | |||||
| Deposit | 23731984 | 38 hrs ago | 0 ETH |
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SyrupDrip
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2024-09-12
*/
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.20 ^0.8.0 ^0.8.20 ^0.8.7;
// contracts/interfaces/ISyrupDrip.sol
interface ISyrupDrip {
/**************************************************************************************************************************************/
/*** Events ***/
/**************************************************************************************************************************************/
/**
* @dev Emitted when new token allocations have been set.
* @param root Root of the Merkle tree containing the new token allocations.
* @param deadline Deadline for claiming the allocations.
* @param maxId Maximum unique identifier of all the token allocations.
*/
event Allocated(bytes32 indexed root, uint256 deadline, uint256 maxId);
/**
* @dev Emitted when a token allocation has been claimed.
* @param id Unique identifier of the token allocation.
* @param account Address of the account that received the tokens.
* @param amount Amount of received tokens.
*/
event Claimed(uint256 indexed id, address indexed account, uint256 amount);
/**
* @dev Emitted when tokens are reclaimed from the contract.
* @param account Address of the account the tokens were sent to.
* @param amount Amount of reclaimed tokens.
*/
event Reclaimed(address indexed account, uint256 amount);
/**
* @dev Emitted when a token allocation has been claimed and staked.
* @param id Unique identifier of the token allocation.
* @param account Address of the account that staked.
* @param assets Amount of assets staked.
* @param shares Amount of shares minted.
*/
event Staked(uint256 indexed id, address indexed account, uint256 assets, uint256 shares);
/**************************************************************************************************************************************/
/*** State-Changing Functions ***/
/**************************************************************************************************************************************/
/**
* @dev Sets new token allocations.
* This will cancel all of the current token allocations.
* Can only be called by the protocol admins.
* @param root Root of the Merkle tree containing the token allocations.
* @param deadline Timestamp after which tokens can no longer be claimed.
* @param maxId Maximum unique identifier of all the token allocations.
*/
function allocate(bytes32 root, uint256 deadline, uint256 maxId) external;
/**
* @dev Claims a token allocation.
* Can only claim a token allocation once.
* Can only be claimed before the deadline expires.
* Can only be claimed if the Merkle proof is valid.
* @param id Unique identifier of the token allocation.
* @param account Address of the token recipient.
* @param claimAmount Amount of tokens to claim.
* @param proof Proof that the recipient is part of the Merkle tree of token allocations.
*/
function claim(uint256 id, address account, uint256 claimAmount, bytes32[] calldata proof) external;
/**
* @dev Claims a token allocation and stakes the claimed tokens.
* Can only claim a token allocation once.
* Can only be claimed before the deadline expires.
* Can only be claimed if the Merkle proof is valid.
* @param id Unique identifier of the token allocation.
* @param account Address of the token recipient.
* @param claimAmount Amount of tokens to claim.
* @param stakeAmount Amount of tokens to stake.
* @param proof Proof that the recipient is part of the Merkle tree of token allocations.
*/
function claimAndStake(uint256 id, address account, uint256 claimAmount, uint256 stakeAmount, bytes32[] calldata proof) external;
/**
* @dev Reclaims tokens from the contract.
* Can only be called by the protocol admins.
* @param to Address of the token recipient
* @param amount Amount of tokens reclaimed.
*/
function reclaim(address to, uint256 amount) external;
/**************************************************************************************************************************************/
/*** View Functions ***/
/**************************************************************************************************************************************/
/**
* @dev Returns the address of the claimable ERC-20 token.
* @return asset Address of the ERC-20 token.
*/
function asset() external view returns (address asset);
/**
* @dev Returns a bitmap that defines which token allocations have been claimed.
* @param index Index of the bitmap array.
* @return bitmap Bitmap of claimed token allocations.
*/
function bitmaps(uint256 index) external view returns (uint256 bitmap);
/**
* @dev Returns the deadline for the current token allocations.
* @return deadline Timestamp before which allocations can be claimed.
*/
function deadline() external view returns (uint256 deadline);
/**
* @dev Returns the address of the `MapleGlobals` contract.
* @return globals Address of the `MapleGlobals` contract.
*/
function globals() external view returns (address globals);
/**
* @dev Returns the maximum identifier of all the current token allocations.
* @return maxId Maximum identifier of all the current token allocations.
*/
function maxId() external view returns (uint256 maxId);
/**
* @dev Returns the root of the Merkle tree containing the current token allocations.
* @return root Root of the Merkle tree.
*/
function root() external view returns (bytes32 root);
/**
* @dev Returns the address of the `StakedSyrup` contract.
* @return stakedSyrup Address of the `StakedSyrup` contract.
*/
function stakedSyrup() external view returns (address stakedSyrup);
}
// contracts/interfaces/Interfaces.sol
interface IBalancerVaultLike {
enum SwapKind { GIVEN_IN, GIVEN_OUT }
struct FundManagement {
address sender;
bool fromInternalBalance;
address recipient;
bool toInternalBalance;
}
struct SingleSwap {
bytes32 poolId;
SwapKind kind;
address assetIn;
address assetOut;
uint256 amount;
bytes userData;
}
function swap(
SingleSwap calldata singleSwap,
FundManagement calldata funds,
uint256 limit,
uint256 deadline
) external returns (uint256 assetDelta);
}
interface IERC20Like_0 {
function allowance(address owner, address spender) external view returns (uint256 allowance);
function balanceOf(address account) external view returns (uint256 balance);
function DOMAIN_SEPARATOR() external view returns (bytes32 domainSeparator);
function PERMIT_TYPEHASH() external view returns (bytes32 permitTypehash);
function approve(address spender, uint256 amount) external returns (bool success);
function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
function transfer(address recipient, uint256 amount) external returns (bool success);
function transferFrom(address owner, address recipient, uint256 amount) external returns (bool success);
}
interface IGlobalsLike {
function governor() external view returns (address governor);
function operationalAdmin() external view returns (address operationalAdmin);
}
interface IMigratorLike {
function migrate(address receiver, uint256 mplAmount) external returns (uint256 syrupAmount);
}
interface IPoolLike is IERC20Like_0 {
function asset() external view returns (address asset);
function convertToExitAssets(uint256 shares) external view returns (uint256);
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
function manager() external view returns (address manager);
}
interface IPoolManagerLike {
function poolPermissionManager() external view returns (address poolPermissionManager);
}
interface IPoolPermissionManagerLike {
function hasPermission(address poolManager, address lender, bytes32 functionId) external view returns (bool hasPermission);
function permissionAdmins(address account) external view returns (bool isAdmin);
function setLenderBitmaps(address[] calldata lenders, uint256[] calldata bitmaps) external;
}
interface IPSMLike {
function buyGem(address account, uint256 daiAmount) external;
function tout() external view returns (uint256 tout); // This is the fee charged for conversion
}
interface ISDaiLike {
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}
interface IRDTLike {
function asset() external view returns (address asset);
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}
interface IStakedSyrupLike {
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
}
// modules/erc20-helper/src/interfaces/IERC20Like.sol
/// @title Interface of the ERC20 standard as needed by ERC20Helper.
interface IERC20Like_1 {
function approve(address spender_, uint256 amount_) external returns (bool success_);
function transfer(address recipient_, uint256 amount_) external returns (bool success_);
function transferFrom(address owner_, address recipient_, uint256 amount_) external returns (bool success_);
}
// modules/open-zeppelin/contracts/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the Merkle tree could be reinterpreted as a leaf value.
* OpenZeppelin's JavaScript library generates Merkle trees that are safe
* against this attack out of the box.
*/
library MerkleProof {
/**
*@dev The multiproof provided is not valid.
*/
error MerkleProofInvalidMultiproof();
/**
* @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) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*/
function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the Merkle tree.
uint256 leavesLen = leaves.length;
uint256 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
if (leavesLen + proofLen != totalHashes + 1) {
revert MerkleProofInvalidMultiproof();
}
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i]
? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
: proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
if (proofPos != proofLen) {
revert MerkleProofInvalidMultiproof();
}
unchecked {
return hashes[totalHashes - 1];
}
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the Merkle tree.
uint256 leavesLen = leaves.length;
uint256 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
if (leavesLen + proofLen != totalHashes + 1) {
revert MerkleProofInvalidMultiproof();
}
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i]
? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
: proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
if (proofPos != proofLen) {
revert MerkleProofInvalidMultiproof();
}
unchecked {
return hashes[totalHashes - 1];
}
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Sorts the pair (a, b) and hashes the result.
*/
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
/**
* @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
*/
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// modules/erc20-helper/src/ERC20Helper.sol
/**
* @title Small Library to standardize erc20 token interactions.
*/
library ERC20Helper {
/**************************************************************************************************************************************/
/*** Internal Functions ***/
/**************************************************************************************************************************************/
function transfer(address token_, address to_, uint256 amount_) internal returns (bool success_) {
return _call(token_, abi.encodeWithSelector(IERC20Like_1.transfer.selector, to_, amount_));
}
function transferFrom(address token_, address from_, address to_, uint256 amount_) internal returns (bool success_) {
return _call(token_, abi.encodeWithSelector(IERC20Like_1.transferFrom.selector, from_, to_, amount_));
}
function approve(address token_, address spender_, uint256 amount_) internal returns (bool success_) {
// If setting approval to zero fails, return false.
if (!_call(token_, abi.encodeWithSelector(IERC20Like_1.approve.selector, spender_, uint256(0)))) return false;
// If `amount_` is zero, return true as the previous step already did this.
if (amount_ == uint256(0)) return true;
// Return the result of setting the approval to `amount_`.
return _call(token_, abi.encodeWithSelector(IERC20Like_1.approve.selector, spender_, amount_));
}
function _call(address token_, bytes memory data_) private returns (bool success_) {
if (token_.code.length == uint256(0)) return false;
bytes memory returnData;
( success_, returnData ) = token_.call(data_);
return success_ && (returnData.length == uint256(0) || abi.decode(returnData, (bool)));
}
}
// contracts/SyrupDrip.sol
contract SyrupDrip is ISyrupDrip {
/**************************************************************************************************************************************/
/*** State Variables ***/
/**************************************************************************************************************************************/
address public immutable override asset;
address public immutable override globals;
address public immutable override stakedSyrup;
bytes32 public override root;
uint256 public override deadline;
uint256 public override maxId;
mapping(uint256 => uint256) public override bitmaps;
/**************************************************************************************************************************************/
/*** Constructor ***/
/**************************************************************************************************************************************/
constructor(address asset_, address globals_, address stakedSyrup_) {
asset = asset_;
globals = globals_;
stakedSyrup = stakedSyrup_;
// Approve the staked syrup contract to transfer the asset.
require(ERC20Helper.approve(asset_, stakedSyrup_, type(uint256).max), "SD:C:APPROVAL_FAILED");
}
/**************************************************************************************************************************************/
/*** Modifiers ***/
/**************************************************************************************************************************************/
modifier onlyProtocolAdmins {
address globals_ = globals;
require(
msg.sender == IGlobalsLike(globals_).governor() ||
msg.sender == IGlobalsLike(globals_).operationalAdmin(),
"SD:NOT_AUTHORIZED"
);
_;
}
/**************************************************************************************************************************************/
/*** External Functions ***/
/**************************************************************************************************************************************/
function allocate(bytes32 root_, uint256 deadline_, uint256 maxId_) external override onlyProtocolAdmins {
require(deadline_ >= block.timestamp, "SD:A:INVALID_DEADLINE");
require(maxId_ >= maxId, "SD:A:INVALID_MAX_ID");
root = root_;
deadline = deadline_;
maxId = maxId_;
emit Allocated(root_, deadline_, maxId_);
}
function claim(uint256 id_, address owner_, uint256 claimAmount_, bytes32[] calldata proof_) external override {
_claim(id_, owner_, claimAmount_, claimAmount_, proof_);
}
function claimAndStake(
uint256 id_,
address owner_,
uint256 claimAmount_,
uint256 stakeAmount_,
bytes32[] calldata proof_
)
external override
{
require(stakeAmount_ > 0, "SD:CAS:ZERO_STAKE_AMOUNT");
require(stakeAmount_ <= claimAmount_, "SD:CAS:INVALID_STAKE_AMOUNT");
_claim(id_, owner_, claimAmount_, claimAmount_ - stakeAmount_, proof_);
uint256 shares_ = IStakedSyrupLike(stakedSyrup).deposit(stakeAmount_, owner_);
emit Staked(id_, owner_, stakeAmount_, shares_);
}
function reclaim(address to_, uint256 amount_) external override onlyProtocolAdmins {
require(amount_ != 0, "SD:R:ZERO_AMOUNT");
require(ERC20Helper.transfer(asset, to_, amount_), "SD:R:TRANSFER_FAIL");
emit Reclaimed(to_, amount_);
}
/**************************************************************************************************************************************/
/*** View Functions ***/
/**************************************************************************************************************************************/
// Checks if a token allocation has already been claimed.
function isClaimed(uint256 id_) public view returns (bool isClaimed_) {
uint256 key_ = id_ / 256;
uint256 flag_ = id_ % 256;
uint256 word_ = bitmaps[key_];
uint256 mask_ = (1 << flag_);
isClaimed_ = word_ & mask_ == mask_;
}
/**************************************************************************************************************************************/
/*** Internal Functions ***/
/**************************************************************************************************************************************/
function _claim(
uint256 id_,
address owner_,
uint256 claimAmount_,
uint256 transferAmount_,
bytes32[] calldata proof_
)
internal
{
require(!isClaimed(id_), "SD:C:ALREADY_CLAIMED");
require(block.timestamp <= deadline, "SD:C:EXPIRED_DEADLINE");
bytes32 leaf_ = keccak256(bytes.concat(keccak256(abi.encode(id_, owner_, claimAmount_))));
require(MerkleProof.verify(proof_, root, leaf_), "SD:C:INVALID_PROOF");
_setClaimed(id_);
if (transferAmount_ > 0) {
require(ERC20Helper.transfer(asset, owner_, transferAmount_), "SD:C:TRANSFER_FAIL");
}
emit Claimed(id_, owner_, claimAmount_);
}
// Registers a token allocation as claimed.
function _setClaimed(uint256 id_) internal {
uint256 key_ = id_ / 256;
uint256 flag_ = id_ % 256;
bitmaps[key_] = bitmaps[key_] | (1 << flag_);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"asset_","type":"address"},{"internalType":"address","name":"globals_","type":"address"},{"internalType":"address","name":"stakedSyrup_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"root","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxId","type":"uint256"}],"name":"Allocated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Reclaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[{"internalType":"bytes32","name":"root_","type":"bytes32"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint256","name":"maxId_","type":"uint256"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bitmaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"claimAmount_","type":"uint256"},{"internalType":"bytes32[]","name":"proof_","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"claimAmount_","type":"uint256"},{"internalType":"uint256","name":"stakeAmount_","type":"uint256"},{"internalType":"bytes32[]","name":"proof_","type":"bytes32[]"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globals","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"isClaimed_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"reclaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedSyrup","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e060405234801562000010575f80fd5b50604051620012663803806200126683398101604081905262000033916200023e565b6001600160a01b0380841660805282811660a052811660c0526200005a83825f19620000b4565b620000ab5760405162461bcd60e51b815260206004820152601460248201527f53443a433a415050524f56414c5f4641494c4544000000000000000000000000604482015260640160405180910390fd5b505050620002d4565b6040516001600160a01b03831660248201525f60448201819052906200011c90859063095ea7b360e01b906064015b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200017416565b6200012957505f6200016d565b8162000138575060016200016d565b6040516001600160a01b0384166024820152604481018390526200016a90859063095ea7b360e01b90606401620000e3565b90505b9392505050565b5f6001600160a01b0383163b6200018d57505f6200021c565b6060836001600160a01b031683604051620001a9919062000285565b5f604051808303815f865af19150503d805f8114620001e4576040519150601f19603f3d011682016040523d82523d5f602084013e620001e9565b606091505b5090925090508180156200021857508051158062000218575080806020019051810190620002189190620002b3565b9150505b92915050565b80516001600160a01b038116811462000239575f80fd5b919050565b5f805f6060848603121562000251575f80fd5b6200025c8462000222565b92506200026c6020850162000222565b91506200027c6040850162000222565b90509250925092565b5f82515f5b81811015620002a657602081860181015185830152016200028a565b505f920191825250919050565b5f60208284031215620002c4575f80fd5b815180151581146200016d575f80fd5b60805160a05160c051610f45620003215f395f818161016f01526102e201525f81816101b9015281816103be015261064501525f818160fe0152818161055501526109fb0152610f455ff3fe608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806393ee59261161006e57806393ee59261461016a5780639e34070f14610191578063c3124525146101b4578063c5ea3c65146101db578063cff5615b146101e4578063ebf0c717146101f7575f80fd5b8063094df54f146100b557806329dcb0cf146100ca5780632e7ba6ef146100e657806338d52e0f146100f957806368aaecc3146101385780638bd317eb14610157575b5f80fd5b6100c86100c3366004610cc8565b6101ff565b005b6100d360015481565b6040519081526020015b60405180910390f35b6100c86100f4366004610d36565b6103a6565b6101207f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100dd565b6100d3610146366004610d9b565b60036020525f908152604090205481565b6100c8610165366004610db2565b6103bb565b6101207f000000000000000000000000000000000000000000000000000000000000000081565b6101a461019f366004610d9b565b610604565b60405190151581526020016100dd565b6101207f000000000000000000000000000000000000000000000000000000000000000081565b6100d360025481565b6100c86101f2366004610ddc565b610642565b6100d35f5481565b5f83116102535760405162461bcd60e51b815260206004820152601860248201527f53443a4341533a5a45524f5f5354414b455f414d4f554e54000000000000000060448201526064015b60405180910390fd5b838311156102a35760405162461bcd60e51b815260206004820152601b60248201527f53443a4341533a494e56414c49445f5354414b455f414d4f554e540000000000604482015260640161024a565b6102ba8686866102b38782610e19565b8686610874565b604051636e553f6560e01b8152600481018490526001600160a01b0386811660248301525f917f000000000000000000000000000000000000000000000000000000000000000090911690636e553f65906044016020604051808303815f875af115801561032a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034e9190610e2c565b9050856001600160a01b0316877f17700ceb1658b18206f427c1578048e87504106b14ec69e9b4586d9a95174a328684604051610395929190918252602082015260400190565b60405180910390a350505050505050565b6103b4858585868686610874565b5050505050565b5f7f00000000000000000000000000000000000000000000000000000000000000009050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa15801561041b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043f9190610e43565b6001600160a01b0316336001600160a01b031614806104ce5750806001600160a01b0316630b52d12d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610495573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104b99190610e43565b6001600160a01b0316336001600160a01b0316145b61050e5760405162461bcd60e51b815260206004820152601160248201527014d10e9393d517d055551213d492569151607a1b604482015260640161024a565b815f036105505760405162461bcd60e51b815260206004820152601060248201526f14d10e948e96915493d7d05353d5539560821b604482015260640161024a565b61057b7f00000000000000000000000000000000000000000000000000000000000000008484610a9e565b6105bc5760405162461bcd60e51b815260206004820152601260248201527114d10e948e9514905394d1915497d190525360721b604482015260640161024a565b826001600160a01b03167fcab347be18c8c37ef504626a027a12ea6725f491b5f5b154778d8d0c54f7841e836040516105f791815260200190565b60405180910390a2505050565b5f8061061261010084610e72565b90505f61062161010085610e85565b5f9283526003602052604090922054600190921b9182169091149392505050565b5f7f00000000000000000000000000000000000000000000000000000000000000009050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c69190610e43565b6001600160a01b0316336001600160a01b031614806107555750806001600160a01b0316630b52d12d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561071c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107409190610e43565b6001600160a01b0316336001600160a01b0316145b6107955760405162461bcd60e51b815260206004820152601160248201527014d10e9393d517d055551213d492569151607a1b604482015260640161024a565b428310156107dd5760405162461bcd60e51b815260206004820152601560248201527453443a413a494e56414c49445f444541444c494e4560581b604482015260640161024a565b6002548210156108255760405162461bcd60e51b815260206004820152601360248201527214d10e904e9253959053125117d3505617d251606a1b604482015260640161024a565b5f84905560018390556002829055604080518481526020810184905285917f89728618f317c3662129a1b70d0962e231ea5b6b22879625f6ed7f7ce1f9ec42910160405180910390a250505050565b61087d86610604565b156108c15760405162461bcd60e51b815260206004820152601460248201527314d10e90ce9053149150511657d0d3105253515160621b604482015260640161024a565b60015442111561090b5760405162461bcd60e51b815260206004820152601560248201527453443a433a455850495245445f444541444c494e4560581b604482015260640161024a565b60408051602081018890526001600160a01b03871691810191909152606081018590525f9060800160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506109a68383808060200260200160405190810160405280939291908181526020018383602002808284375f920182905250549250859150610afa9050565b6109e75760405162461bcd60e51b815260206004820152601260248201527129a21d219d24a72b20a624a22fa82927a7a360711b604482015260640161024a565b6109f087610b0f565b8315610a6257610a217f00000000000000000000000000000000000000000000000000000000000000008786610a9e565b610a625760405162461bcd60e51b815260206004820152601260248201527114d10e90ce9514905394d1915497d190525360721b604482015260640161024a565b856001600160a01b0316877f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0268760405161039591815260200190565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790525f90610af2908590610b4a565b949350505050565b5f82610b068584610bee565b14949350505050565b5f610b1c61010083610e72565b90505f610b2b61010084610e85565b5f928352600360205260409092208054600190931b9092179091555050565b5f6001600160a01b0383163b610b6157505f610be8565b6060836001600160a01b031683604051610b7b9190610e98565b5f604051808303815f865af19150503d805f8114610bb4576040519150601f19603f3d011682016040523d82523d5f602084013e610bb9565b606091505b509092509050818015610be4575080511580610be4575080806020019051810190610be49190610ec4565b9150505b92915050565b5f81815b8451811015610c3257610c1e82868381518110610c1157610c11610ee3565b6020026020010151610c3a565b915080610c2a81610ef7565b915050610bf2565b509392505050565b5f818310610c54575f828152602084905260409020610c62565b5f8381526020839052604090205b9392505050565b6001600160a01b0381168114610c7d575f80fd5b50565b5f8083601f840112610c90575f80fd5b50813567ffffffffffffffff811115610ca7575f80fd5b6020830191508360208260051b8501011115610cc1575f80fd5b9250929050565b5f805f805f8060a08789031215610cdd575f80fd5b863595506020870135610cef81610c69565b94506040870135935060608701359250608087013567ffffffffffffffff811115610d18575f80fd5b610d2489828a01610c80565b979a9699509497509295939492505050565b5f805f805f60808688031215610d4a575f80fd5b853594506020860135610d5c81610c69565b935060408601359250606086013567ffffffffffffffff811115610d7e575f80fd5b610d8a88828901610c80565b969995985093965092949392505050565b5f60208284031215610dab575f80fd5b5035919050565b5f8060408385031215610dc3575f80fd5b8235610dce81610c69565b946020939093013593505050565b5f805f60608486031215610dee575f80fd5b505081359360208301359350604090920135919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610be857610be8610e05565b5f60208284031215610e3c575f80fd5b5051919050565b5f60208284031215610e53575f80fd5b8151610c6281610c69565b634e487b7160e01b5f52601260045260245ffd5b5f82610e8057610e80610e5e565b500490565b5f82610e9357610e93610e5e565b500690565b5f82515f5b81811015610eb75760208186018101518583015201610e9d565b505f920191825250919050565b5f60208284031215610ed4575f80fd5b81518015158114610c62575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f60018201610f0857610f08610e05565b506001019056fea2646970667358221220ee8ecaafc6f8fbe8715e1f631d0a56cbba6324c36251964528a1b4dc326c07ac64736f6c63430008140033000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d66000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c000000000000000000000000c7e8b36e0766d9b04c93de68a9d47dd11f260b45
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806393ee59261161006e57806393ee59261461016a5780639e34070f14610191578063c3124525146101b4578063c5ea3c65146101db578063cff5615b146101e4578063ebf0c717146101f7575f80fd5b8063094df54f146100b557806329dcb0cf146100ca5780632e7ba6ef146100e657806338d52e0f146100f957806368aaecc3146101385780638bd317eb14610157575b5f80fd5b6100c86100c3366004610cc8565b6101ff565b005b6100d360015481565b6040519081526020015b60405180910390f35b6100c86100f4366004610d36565b6103a6565b6101207f000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d6681565b6040516001600160a01b0390911681526020016100dd565b6100d3610146366004610d9b565b60036020525f908152604090205481565b6100c8610165366004610db2565b6103bb565b6101207f000000000000000000000000c7e8b36e0766d9b04c93de68a9d47dd11f260b4581565b6101a461019f366004610d9b565b610604565b60405190151581526020016100dd565b6101207f000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c81565b6100d360025481565b6100c86101f2366004610ddc565b610642565b6100d35f5481565b5f83116102535760405162461bcd60e51b815260206004820152601860248201527f53443a4341533a5a45524f5f5354414b455f414d4f554e54000000000000000060448201526064015b60405180910390fd5b838311156102a35760405162461bcd60e51b815260206004820152601b60248201527f53443a4341533a494e56414c49445f5354414b455f414d4f554e540000000000604482015260640161024a565b6102ba8686866102b38782610e19565b8686610874565b604051636e553f6560e01b8152600481018490526001600160a01b0386811660248301525f917f000000000000000000000000c7e8b36e0766d9b04c93de68a9d47dd11f260b4590911690636e553f65906044016020604051808303815f875af115801561032a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034e9190610e2c565b9050856001600160a01b0316877f17700ceb1658b18206f427c1578048e87504106b14ec69e9b4586d9a95174a328684604051610395929190918252602082015260400190565b60405180910390a350505050505050565b6103b4858585868686610874565b5050505050565b5f7f000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c9050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa15801561041b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043f9190610e43565b6001600160a01b0316336001600160a01b031614806104ce5750806001600160a01b0316630b52d12d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610495573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104b99190610e43565b6001600160a01b0316336001600160a01b0316145b61050e5760405162461bcd60e51b815260206004820152601160248201527014d10e9393d517d055551213d492569151607a1b604482015260640161024a565b815f036105505760405162461bcd60e51b815260206004820152601060248201526f14d10e948e96915493d7d05353d5539560821b604482015260640161024a565b61057b7f000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d668484610a9e565b6105bc5760405162461bcd60e51b815260206004820152601260248201527114d10e948e9514905394d1915497d190525360721b604482015260640161024a565b826001600160a01b03167fcab347be18c8c37ef504626a027a12ea6725f491b5f5b154778d8d0c54f7841e836040516105f791815260200190565b60405180910390a2505050565b5f8061061261010084610e72565b90505f61062161010085610e85565b5f9283526003602052604090922054600190921b9182169091149392505050565b5f7f000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c9050806001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c69190610e43565b6001600160a01b0316336001600160a01b031614806107555750806001600160a01b0316630b52d12d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561071c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107409190610e43565b6001600160a01b0316336001600160a01b0316145b6107955760405162461bcd60e51b815260206004820152601160248201527014d10e9393d517d055551213d492569151607a1b604482015260640161024a565b428310156107dd5760405162461bcd60e51b815260206004820152601560248201527453443a413a494e56414c49445f444541444c494e4560581b604482015260640161024a565b6002548210156108255760405162461bcd60e51b815260206004820152601360248201527214d10e904e9253959053125117d3505617d251606a1b604482015260640161024a565b5f84905560018390556002829055604080518481526020810184905285917f89728618f317c3662129a1b70d0962e231ea5b6b22879625f6ed7f7ce1f9ec42910160405180910390a250505050565b61087d86610604565b156108c15760405162461bcd60e51b815260206004820152601460248201527314d10e90ce9053149150511657d0d3105253515160621b604482015260640161024a565b60015442111561090b5760405162461bcd60e51b815260206004820152601560248201527453443a433a455850495245445f444541444c494e4560581b604482015260640161024a565b60408051602081018890526001600160a01b03871691810191909152606081018590525f9060800160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506109a68383808060200260200160405190810160405280939291908181526020018383602002808284375f920182905250549250859150610afa9050565b6109e75760405162461bcd60e51b815260206004820152601260248201527129a21d219d24a72b20a624a22fa82927a7a360711b604482015260640161024a565b6109f087610b0f565b8315610a6257610a217f000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d668786610a9e565b610a625760405162461bcd60e51b815260206004820152601260248201527114d10e90ce9514905394d1915497d190525360721b604482015260640161024a565b856001600160a01b0316877f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0268760405161039591815260200190565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790525f90610af2908590610b4a565b949350505050565b5f82610b068584610bee565b14949350505050565b5f610b1c61010083610e72565b90505f610b2b61010084610e85565b5f928352600360205260409092208054600190931b9092179091555050565b5f6001600160a01b0383163b610b6157505f610be8565b6060836001600160a01b031683604051610b7b9190610e98565b5f604051808303815f865af19150503d805f8114610bb4576040519150601f19603f3d011682016040523d82523d5f602084013e610bb9565b606091505b509092509050818015610be4575080511580610be4575080806020019051810190610be49190610ec4565b9150505b92915050565b5f81815b8451811015610c3257610c1e82868381518110610c1157610c11610ee3565b6020026020010151610c3a565b915080610c2a81610ef7565b915050610bf2565b509392505050565b5f818310610c54575f828152602084905260409020610c62565b5f8381526020839052604090205b9392505050565b6001600160a01b0381168114610c7d575f80fd5b50565b5f8083601f840112610c90575f80fd5b50813567ffffffffffffffff811115610ca7575f80fd5b6020830191508360208260051b8501011115610cc1575f80fd5b9250929050565b5f805f805f8060a08789031215610cdd575f80fd5b863595506020870135610cef81610c69565b94506040870135935060608701359250608087013567ffffffffffffffff811115610d18575f80fd5b610d2489828a01610c80565b979a9699509497509295939492505050565b5f805f805f60808688031215610d4a575f80fd5b853594506020860135610d5c81610c69565b935060408601359250606086013567ffffffffffffffff811115610d7e575f80fd5b610d8a88828901610c80565b969995985093965092949392505050565b5f60208284031215610dab575f80fd5b5035919050565b5f8060408385031215610dc3575f80fd5b8235610dce81610c69565b946020939093013593505050565b5f805f60608486031215610dee575f80fd5b505081359360208301359350604090920135919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610be857610be8610e05565b5f60208284031215610e3c575f80fd5b5051919050565b5f60208284031215610e53575f80fd5b8151610c6281610c69565b634e487b7160e01b5f52601260045260245ffd5b5f82610e8057610e80610e5e565b500490565b5f82610e9357610e93610e5e565b500690565b5f82515f5b81811015610eb75760208186018101518583015201610e9d565b505f920191825250919050565b5f60208284031215610ed4575f80fd5b81518015158114610c62575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f60018201610f0857610f08610e05565b506001019056fea2646970667358221220ee8ecaafc6f8fbe8715e1f631d0a56cbba6324c36251964528a1b4dc326c07ac64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d66000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c000000000000000000000000c7e8b36e0766d9b04c93de68a9d47dd11f260b45
-----Decoded View---------------
Arg [0] : asset_ (address): 0x643C4E15d7d62Ad0aBeC4a9BD4b001aA3Ef52d66
Arg [1] : globals_ (address): 0x804a6F5F667170F545Bf14e5DDB48C70B788390C
Arg [2] : stakedSyrup_ (address): 0xc7E8b36E0766D9B04c93De68A9D47dD11f260B45
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000643c4e15d7d62ad0abec4a9bd4b001aa3ef52d66
Arg [1] : 000000000000000000000000804a6f5f667170f545bf14e5ddb48c70b788390c
Arg [2] : 000000000000000000000000c7e8b36e0766d9b04c93de68a9d47dd11f260b45
Deployed Bytecode Sourcemap
22671:6465:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26000:611;;;;;;:::i;:::-;;:::i;:::-;;23326:32;;;;;;;;;1451:25:1;;;1439:2;1424:18;23326:32:0;;;;;;;;25807:185;;;;;;:::i;:::-;;:::i;23141:39::-;;;;;;;;-1:-1:-1;;;;;2365:32:1;;;2347:51;;2335:2;2320:18;23141:39:0;2201:203:1;23403:51:0;;;;;;:::i;:::-;;;;;;;;;;;;;;26619:297;;;;;;:::i;:::-;;:::i;23235:45::-;;;;;27415:277;;;;;;:::i;:::-;;:::i;:::-;;;3079:14:1;;3072:22;3054:41;;3042:2;3027:18;27415:277:0;2914:187:1;23187:41:0;;;;;23365:29;;;;;;25401:398;;;;;;:::i;:::-;;:::i;23289:28::-;;;;;;26000:611;26249:1;26234:12;:16;26226:65;;;;-1:-1:-1;;;26226:65:0;;3811:2:1;26226:65:0;;;3793:21:1;3850:2;3830:18;;;3823:30;3889:26;3869:18;;;3862:54;3933:18;;26226:65:0;;;;;;;;;26326:12;26310;:28;;26302:68;;;;-1:-1:-1;;;26302:68:0;;4164:2:1;26302:68:0;;;4146:21:1;4203:2;4183:18;;;4176:30;4242:29;4222:18;;;4215:57;4289:18;;26302:68:0;3962:351:1;26302:68:0;26383:70;26390:3;26395:6;26403:12;26417:27;26432:12;26403;26417:27;:::i;:::-;26446:6;;26383;:70::i;:::-;26484:59;;-1:-1:-1;;;26484:59:0;;;;;4757:25:1;;;-1:-1:-1;;;;;4818:32:1;;;4798:18;;;4791:60;26466:15:0;;26501:11;26484:37;;;;;;4730:18:1;;26484:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26466:77;;26573:6;-1:-1:-1;;;;;26561:42:0;26568:3;26561:42;26581:12;26595:7;26561:42;;;;;;5225:25:1;;;5281:2;5266:18;;5259:34;5213:2;5198:18;;5051:248;26561:42:0;;;;;;;;26215:396;26000:611;;;;;;:::o;25807:185::-;25929:55;25936:3;25941:6;25949:12;25963;25977:6;;25929;:55::i;:::-;25807:185;;;;;:::o;26619:297::-;24718:16;24737:7;24718:26;;24806:8;-1:-1:-1;;;;;24793:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;24779:47:0;:10;-1:-1:-1;;;;;24779:47:0;;:119;;;;24870:8;-1:-1:-1;;;;;24857:39:0;;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;24843:55:0;:10;-1:-1:-1;;;;;24843:55:0;;24779:119;24757:186;;;;-1:-1:-1;;;24757:186:0;;5762:2:1;24757:186:0;;;5744:21:1;5801:2;5781:18;;;5774:30;-1:-1:-1;;;5820:18:1;;;5813:47;5877:18;;24757:186:0;5560:341:1;24757:186:0;26722:7:::1;26733:1;26722:12:::0;26714:70:::1;;;::::0;-1:-1:-1;;;26714:70:0;;6108:2:1;26714:70:0::1;::::0;::::1;6090:21:1::0;6147:2;6127:18;;;6120:30;-1:-1:-1;;;6166:18:1;;;6159:46;6222:18;;26714:70:0::1;5906:340:1::0;26714:70:0::1;26803:41;26824:5;26831:3;26836:7;26803:20;:41::i;:::-;26795:72;;;::::0;-1:-1:-1;;;26795:72:0;;6453:2:1;26795:72:0::1;::::0;::::1;6435:21:1::0;6492:2;6472:18;;;6465:30;-1:-1:-1;;;6511:18:1;;;6504:48;6569:18;;26795:72:0::1;6251:342:1::0;26795:72:0::1;26895:3;-1:-1:-1::0;;;;;26885:23:0::1;;26900:7;26885:23;;;;1451:25:1::0;;1439:2;1424:18;;1305:177;26885:23:0::1;;;;;;;;24707:258:::0;26619:297;;:::o;27415:277::-;27468:15;;27512:9;27518:3;27512;:9;:::i;:::-;27496:25;-1:-1:-1;27532:13:0;27548:9;27554:3;27548;:9;:::i;:::-;27568:13;27584;;;:7;:13;;;;;;;27625:1;:10;;;27662:13;;;:22;;;;27415:277;-1:-1:-1;;;27415:277:0:o;25401:398::-;24718:16;24737:7;24718:26;;24806:8;-1:-1:-1;;;;;24793:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;24779:47:0;:10;-1:-1:-1;;;;;24779:47:0;;:119;;;;24870:8;-1:-1:-1;;;;;24857:39:0;;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;24843:55:0;:10;-1:-1:-1;;;;;24843:55:0;;24779:119;24757:186;;;;-1:-1:-1;;;24757:186:0;;5762:2:1;24757:186:0;;;5744:21:1;5801:2;5781:18;;;5774:30;-1:-1:-1;;;5820:18:1;;;5813:47;5877:18;;24757:186:0;5560:341:1;24757:186:0;25538:15:::1;25525:9;:28;;25517:62;;;::::0;-1:-1:-1;;;25517:62:0;;7174:2:1;25517:62:0::1;::::0;::::1;7156:21:1::0;7213:2;7193:18;;;7186:30;-1:-1:-1;;;7232:18:1;;;7225:51;7293:18;;25517:62:0::1;6972:345:1::0;25517:62:0::1;25608:5;;25598:6;:15;;25590:60;;;::::0;-1:-1:-1;;;25590:60:0;;7524:2:1;25590:60:0::1;::::0;::::1;7506:21:1::0;7563:2;7543:18;;;7536:30;-1:-1:-1;;;7582:18:1;;;7575:49;7641:18;;25590:60:0::1;7322:343:1::0;25590:60:0::1;25663:4;:16:::0;;;25690:8:::1;:20:::0;;;25721:5:::1;:17:::0;;;25756:35:::1;::::0;;5225:25:1;;;5281:2;5266:18;;5259:34;;;25663:16:0;;25756:35:::1;::::0;5198:18:1;25756:35:0::1;;;;;;;24707:258:::0;25401:398;;;:::o;28128:766::-;28350:14;28360:3;28350:9;:14::i;:::-;28349:15;28341:60;;;;-1:-1:-1;;;28341:60:0;;7872:2:1;28341:60:0;;;7854:21:1;7911:2;7891:18;;;7884:30;-1:-1:-1;;;7930:18:1;;;7923:50;7990:18;;28341:60:0;7670:344:1;28341:60:0;28439:8;;28420:15;:27;;28412:61;;;;-1:-1:-1;;;28412:61:0;;8221:2:1;28412:61:0;;;8203:21:1;8260:2;8240:18;;;8233:30;-1:-1:-1;;;8279:18:1;;;8272:51;8340:18;;28412:61:0;8019:345:1;28412:61:0;28535:37;;;;;;8571:25:1;;;-1:-1:-1;;;;;8632:32:1;;8612:18;;;8605:60;;;;8681:18;;;8674:34;;;28486:13:0;;8544:18:1;;28535:37:0;;;-1:-1:-1;;28535:37:0;;;;;;;;;28525:48;;28535:37;28525:48;;;;28512:62;;;8848:19:1;8883:12;28512:62:0;;;;;;;;;;;;28502:73;;;;;;28486:89;;28596:39;28615:6;;28596:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28623:4:0;;-1:-1:-1;28629:5:0;;-1:-1:-1;28596:18:0;;-1:-1:-1;28596:39:0:i;:::-;28588:70;;;;-1:-1:-1;;;28588:70:0;;9108:2:1;28588:70:0;;;9090:21:1;9147:2;9127:18;;;9120:30;-1:-1:-1;;;9166:18:1;;;9159:48;9224:18;;28588:70:0;8906:342:1;28588:70:0;28671:16;28683:3;28671:11;:16::i;:::-;28704:19;;28700:135;;28748:52;28769:5;28776:6;28784:15;28748:20;:52::i;:::-;28740:83;;;;-1:-1:-1;;;28740:83:0;;9455:2:1;28740:83:0;;;9437:21:1;9494:2;9474:18;;;9467:30;-1:-1:-1;;;9513:18:1;;;9506:48;9571:18;;28740:83:0;9253:342:1;28740:83:0;28865:6;-1:-1:-1;;;;;28852:34:0;28860:3;28852:34;28873:12;28852:34;;;;1451:25:1;;1439:2;1424:18;;1305:177;21222:206:0;21351:68;;;-1:-1:-1;;;;;9792:32:1;;21351:68:0;;;9774:51:1;9841:18;;;;9834:34;;;21351:68:0;;;;;;;;;;9747:18:1;;;;21351:68:0;;;;;;;;-1:-1:-1;;;;;21351:68:0;-1:-1:-1;;;21351:68:0;;;-1:-1:-1;;21337:83:0;;21343:6;;21337:5;:83::i;:::-;21330:90;21222:206;-1:-1:-1;;;;21222:206:0:o;11944:156::-;12035:4;12088;12059:25;12072:5;12079:4;12059:12;:25::i;:::-;:33;;11944:156;-1:-1:-1;;;;11944:156:0:o;28951:180::-;29005:12;29021:9;29027:3;29021;:9;:::i;:::-;29005:25;-1:-1:-1;29041:13:0;29057:9;29063:3;29057;:9;:::i;:::-;29095:13;;;;:7;:13;;;;;;;;29112:1;:10;;;29095:28;;;29079:44;;;-1:-1:-1;;28951:180:0:o;22289:343::-;22357:13;-1:-1:-1;;;;;22387:18:0;;;22383:50;;-1:-1:-1;22428:5:0;22421:12;;22383:50;22446:23;22507:6;-1:-1:-1;;;;;22507:11:0;22519:5;22507:18;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22480:45:0;;-1:-1:-1;22480:45:0;-1:-1:-1;22480:45:0;22545:79;;;;-1:-1:-1;22558:17:0;;:31;;:65;;;22604:10;22593:30;;;;;;;;;;;;:::i;:::-;22538:86;;;22289:343;;;;;:::o;12663:296::-;12746:7;12789:4;12746:7;12804:118;12828:5;:12;12824:1;:16;12804:118;;;12877:33;12887:12;12901:5;12907:1;12901:8;;;;;;;;:::i;:::-;;;;;;;12877:9;:33::i;:::-;12862:48;-1:-1:-1;12842:3:0;;;;:::i;:::-;;;;12804:118;;;-1:-1:-1;12939:12:0;12663:296;-1:-1:-1;;;12663:296:0:o;20093:149::-;20156:7;20187:1;20183;:5;:51;;20435:13;20529:15;;;20565:4;20558:15;;;20612:4;20596:21;;20183:51;;;20435:13;20529:15;;;20565:4;20558:15;;;20612:4;20596:21;;20191:20;20176:58;20093:149;-1:-1:-1;;;20093:149:0:o;14:131:1:-;-1:-1:-1;;;;;89:31:1;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:367::-;213:8;223:6;277:3;270:4;262:6;258:17;254:27;244:55;;295:1;292;285:12;244:55;-1:-1:-1;318:20:1;;361:18;350:30;;347:50;;;393:1;390;383:12;347:50;430:4;422:6;418:17;406:29;;490:3;483:4;473:6;470:1;466:14;458:6;454:27;450:38;447:47;444:67;;;507:1;504;497:12;444:67;150:367;;;;;:::o;522:778::-;644:6;652;660;668;676;684;737:3;725:9;716:7;712:23;708:33;705:53;;;754:1;751;744:12;705:53;790:9;777:23;767:33;;850:2;839:9;835:18;822:32;863:31;888:5;863:31;:::i;:::-;913:5;-1:-1:-1;965:2:1;950:18;;937:32;;-1:-1:-1;1016:2:1;1001:18;;988:32;;-1:-1:-1;1071:3:1;1056:19;;1043:33;1099:18;1088:30;;1085:50;;;1131:1;1128;1121:12;1085:50;1170:70;1232:7;1223:6;1212:9;1208:22;1170:70;:::i;:::-;522:778;;;;-1:-1:-1;522:778:1;;-1:-1:-1;522:778:1;;1259:8;;522:778;-1:-1:-1;;;522:778:1:o;1487:709::-;1600:6;1608;1616;1624;1632;1685:3;1673:9;1664:7;1660:23;1656:33;1653:53;;;1702:1;1699;1692:12;1653:53;1738:9;1725:23;1715:33;;1798:2;1787:9;1783:18;1770:32;1811:31;1836:5;1811:31;:::i;:::-;1861:5;-1:-1:-1;1913:2:1;1898:18;;1885:32;;-1:-1:-1;1968:2:1;1953:18;;1940:32;1995:18;1984:30;;1981:50;;;2027:1;2024;2017:12;1981:50;2066:70;2128:7;2119:6;2108:9;2104:22;2066:70;:::i;:::-;1487:709;;;;-1:-1:-1;1487:709:1;;-1:-1:-1;2155:8:1;;2040:96;1487:709;-1:-1:-1;;;1487:709:1:o;2409:180::-;2468:6;2521:2;2509:9;2500:7;2496:23;2492:32;2489:52;;;2537:1;2534;2527:12;2489:52;-1:-1:-1;2560:23:1;;2409:180;-1:-1:-1;2409:180:1:o;2594:315::-;2662:6;2670;2723:2;2711:9;2702:7;2698:23;2694:32;2691:52;;;2739:1;2736;2729:12;2691:52;2778:9;2765:23;2797:31;2822:5;2797:31;:::i;:::-;2847:5;2899:2;2884:18;;;;2871:32;;-1:-1:-1;;;2594:315:1:o;3106:316::-;3183:6;3191;3199;3252:2;3240:9;3231:7;3227:23;3223:32;3220:52;;;3268:1;3265;3258:12;3220:52;-1:-1:-1;;3291:23:1;;;3361:2;3346:18;;3333:32;;-1:-1:-1;3412:2:1;3397:18;;;3384:32;;3106:316;-1:-1:-1;3106:316:1:o;4318:127::-;4379:10;4374:3;4370:20;4367:1;4360:31;4410:4;4407:1;4400:15;4434:4;4431:1;4424:15;4450:128;4517:9;;;4538:11;;;4535:37;;;4552:18;;:::i;4862:184::-;4932:6;4985:2;4973:9;4964:7;4960:23;4956:32;4953:52;;;5001:1;4998;4991:12;4953:52;-1:-1:-1;5024:16:1;;4862:184;-1:-1:-1;4862:184:1:o;5304:251::-;5374:6;5427:2;5415:9;5406:7;5402:23;5398:32;5395:52;;;5443:1;5440;5433:12;5395:52;5475:9;5469:16;5494:31;5519:5;5494:31;:::i;6598:127::-;6659:10;6654:3;6650:20;6647:1;6640:31;6690:4;6687:1;6680:15;6714:4;6711:1;6704:15;6730:120;6770:1;6796;6786:35;;6801:18;;:::i;:::-;-1:-1:-1;6835:9:1;;6730:120::o;6855:112::-;6887:1;6913;6903:35;;6918:18;;:::i;:::-;-1:-1:-1;6952:9:1;;6855:112::o;9879:412::-;10008:3;10046:6;10040:13;10071:1;10081:129;10095:6;10092:1;10089:13;10081:129;;;10193:4;10177:14;;;10173:25;;10167:32;10154:11;;;10147:53;10110:12;10081:129;;;-1:-1:-1;10265:1:1;10229:16;;10254:13;;;-1:-1:-1;10229:16:1;9879:412;-1:-1:-1;9879:412:1:o;10296:277::-;10363:6;10416:2;10404:9;10395:7;10391:23;10387:32;10384:52;;;10432:1;10429;10422:12;10384:52;10464:9;10458:16;10517:5;10510:13;10503:21;10496:5;10493:32;10483:60;;10539:1;10536;10529:12;10578:127;10639:10;10634:3;10630:20;10627:1;10620:31;10670:4;10667:1;10660:15;10694:4;10691:1;10684:15;10710:135;10749:3;10770:17;;;10767:43;;10790:18;;:::i;:::-;-1:-1:-1;10837:1:1;10826:13;;10710:135::o
Swarm Source
ipfs://ee8ecaafc6f8fbe8715e1f631d0a56cbba6324c36251964528a1b4dc326c07ac
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.396338 | 619,700.7803 | $245,610.97 |
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.