Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,641 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Batch Alloca... | 19697421 | 365 days ago | IN | 0 ETH | 0.00117937 | ||||
Set Batch Alloca... | 19696603 | 365 days ago | IN | 0 ETH | 0.00083672 | ||||
Set Batch Alloca... | 19562743 | 384 days ago | IN | 0 ETH | 0.00352143 | ||||
Set Batch Alloca... | 19555510 | 385 days ago | IN | 0 ETH | 0.00096998 | ||||
Set Batch Alloca... | 19552634 | 385 days ago | IN | 0 ETH | 0.00077537 | ||||
Set Batch Alloca... | 19536311 | 387 days ago | IN | 0 ETH | 0.00206408 | ||||
Set Batch Alloca... | 19531657 | 388 days ago | IN | 0 ETH | 0.00239162 | ||||
Set Batch Alloca... | 19527800 | 389 days ago | IN | 0 ETH | 0.00617004 | ||||
Set Batch Alloca... | 19527124 | 389 days ago | IN | 0 ETH | 0.00332369 | ||||
Set Batch Alloca... | 19526590 | 389 days ago | IN | 0 ETH | 0.00263396 | ||||
Set Batch Alloca... | 19524149 | 389 days ago | IN | 0 ETH | 0.00229877 | ||||
Set Batch Alloca... | 19524141 | 389 days ago | IN | 0 ETH | 0.00261372 | ||||
Set Batch Alloca... | 19524074 | 389 days ago | IN | 0 ETH | 0.00421198 | ||||
Set Batch Alloca... | 19524063 | 389 days ago | IN | 0 ETH | 0.00132196 | ||||
Set Batch Alloca... | 19524059 | 389 days ago | IN | 0 ETH | 0.00405602 | ||||
Set Batch Alloca... | 19524050 | 389 days ago | IN | 0 ETH | 0.00143845 | ||||
Set Batch Alloca... | 19516842 | 390 days ago | IN | 0 ETH | 0.00128182 | ||||
Set Batch Alloca... | 19516840 | 390 days ago | IN | 0 ETH | 0.00062324 | ||||
Set Batch Alloca... | 19516833 | 390 days ago | IN | 0 ETH | 0.00149321 | ||||
Set Batch Alloca... | 19507212 | 391 days ago | IN | 0 ETH | 0.00242532 | ||||
Set Batch Alloca... | 19507204 | 391 days ago | IN | 0 ETH | 0.00074675 | ||||
Set Batch Alloca... | 19502848 | 392 days ago | IN | 0 ETH | 0.00090792 | ||||
Set Batch Alloca... | 19498062 | 393 days ago | IN | 0 ETH | 0.00142093 | ||||
Set Batch Alloca... | 19496724 | 393 days ago | IN | 0 ETH | 0.00122777 | ||||
Set Batch Alloca... | 19495631 | 393 days ago | IN | 0 ETH | 0.00350916 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
veAllocate
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 contract veAllocate { mapping(address => mapping(address => mapping(uint256 => uint256))) private veAllocation; mapping(address => uint256) private _totalAllocation; event AllocationSet( address indexed sender, address indexed nft, uint256 indexed chainId, uint256 amount ); event AllocationSetMultiple( address indexed sender, address[] nft, uint256[] chainId, uint256[] amount ); function getveAllocation( address user, address nft, uint256 chainid ) external view returns (uint256) { return veAllocation[user][nft][chainid]; } function getTotalAllocation(address user) public view returns (uint256) { return _totalAllocation[user]; } function setAllocation( uint256 amount, address nft, uint256 chainId ) external { _totalAllocation[msg.sender] = _totalAllocation[msg.sender] + amount - veAllocation[msg.sender][nft][chainId]; require(_totalAllocation[msg.sender] <= 10000, "Max Allocation"); veAllocation[msg.sender][nft][chainId] = amount; emit AllocationSet(msg.sender, nft, chainId, amount); } function setBatchAllocation( uint256[] calldata amount, address[] calldata nft, uint256[] calldata chainId ) external { require(amount.length <= 150, 'Too Many Operations'); require(amount.length == nft.length, 'Nft array size missmatch'); require(amount.length == chainId.length, 'Chain array size missmatch'); for (uint256 i = 0; i < amount.length; i++) { _totalAllocation[msg.sender] = _totalAllocation[msg.sender] + amount[i] - veAllocation[msg.sender][nft[i]][chainId[i]]; veAllocation[msg.sender][nft[i]][chainId[i]] = amount[i]; } require(_totalAllocation[msg.sender] <= 10000, "Max Allocation"); emit AllocationSetMultiple(msg.sender, nft, chainId, amount); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AllocationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address[]","name":"nft","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"chainId","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"AllocationSetMultiple","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"chainid","type":"uint256"}],"name":"getveAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"setAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"amount","type":"uint256[]"},{"internalType":"address[]","name":"nft","type":"address[]"},{"internalType":"uint256[]","name":"chainId","type":"uint256[]"}],"name":"setBatchAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506107f4806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063540ffae8146100515780639bf648d314610066578063b38e9637146100b6578063c49a153e146100c9575b600080fd5b61006461005f366004610531565b6100f2565b005b6100a4610074366004610566565b6001600160a01b039283166000908152602081815260408083209490951682529283528381209181529152205490565b60405190815260200160405180910390f35b6100646100c43660046105de565b6101fb565b6100a46100d7366004610678565b6001600160a01b031660009081526001602052604090205490565b336000818152602081815260408083206001600160a01b0387168452825280832085845282528083205493835260019091529020546101329085906106b0565b61013c91906106c8565b33600090815260016020526040902081905561271010156101955760405162461bcd60e51b815260206004820152600e60248201526d26b0bc1020b63637b1b0ba34b7b760911b60448201526064015b60405180910390fd5b336000818152602081815260408083206001600160a01b038716808552908352818420868552835292819020879055518681528493917fa147c6cd0dd0fe2f649713a01540a2dcc9a47d469fb689f358031bf7f2f67011910160405180910390a4505050565b60968511156102425760405162461bcd60e51b8152602060048201526013602482015272546f6f204d616e79204f7065726174696f6e7360681b604482015260640161018c565b8483146102915760405162461bcd60e51b815260206004820152601860248201527f4e66742061727261792073697a65206d6973736d617463680000000000000000604482015260640161018c565b8481146102e05760405162461bcd60e51b815260206004820152601a60248201527f436861696e2061727261792073697a65206d6973736d61746368000000000000604482015260640161018c565b60005b8581101561046f573360009081526020819052604081209086868481811061030d5761030d6106df565b90506020020160208101906103229190610678565b6001600160a01b03166001600160a01b031681526020019081526020016000206000848484818110610356576103566106df565b9050602002013581526020019081526020016000205487878381811061037e5761037e6106df565b336000908152600160209081526040909120546103a29491909202013591506106b0565b6103ac91906106c8565b336000908152600160205260409020558686828181106103ce576103ce6106df565b33600090815260208181526040822092029390930135929091508787858181106103fa576103fa6106df565b905060200201602081019061040f9190610678565b6001600160a01b03166001600160a01b031681526020019081526020016000206000858585818110610443576104436106df565b905060200201358152602001908152602001600020819055508080610467906106f5565b9150506102e3565b503360009081526001602052604090205461271010156104c25760405162461bcd60e51b815260206004820152600e60248201526d26b0bc1020b63637b1b0ba34b7b760911b604482015260640161018c565b336001600160a01b03167f40b9a90d4d04a363a00e6fd9afa85f7336a56acbfad813c80d2030f9390302d2858585858b8b60405161050596959493929190610746565b60405180910390a2505050505050565b80356001600160a01b038116811461052c57600080fd5b919050565b60008060006060848603121561054657600080fd5b8335925061055660208501610515565b9150604084013590509250925092565b60008060006060848603121561057b57600080fd5b61058484610515565b925061055660208501610515565b60008083601f8401126105a457600080fd5b50813567ffffffffffffffff8111156105bc57600080fd5b6020830191508360208260051b85010111156105d757600080fd5b9250929050565b600080600080600080606087890312156105f757600080fd5b863567ffffffffffffffff8082111561060f57600080fd5b61061b8a838b01610592565b9098509650602089013591508082111561063457600080fd5b6106408a838b01610592565b9096509450604089013591508082111561065957600080fd5b5061066689828a01610592565b979a9699509497509295939492505050565b60006020828403121561068a57600080fd5b61069382610515565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156106c3576106c361069a565b500190565b6000828210156106da576106da61069a565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156107095761070961069a565b5060010190565b81835260006001600160fb1b0383111561072957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060808252810186905260008760808301825b89811015610787576001600160a01b0361077284610515565b16825260209283019290910190600101610759565b50838103602085015261079b81888a610710565b91505082810360408401526107b1818587610710565b999850505050505050505056fea26469706673582212208c34b33ea0bd61ea4ea3be29758b1afd2c678dce66229926ed38b43ca6b9168c64736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063540ffae8146100515780639bf648d314610066578063b38e9637146100b6578063c49a153e146100c9575b600080fd5b61006461005f366004610531565b6100f2565b005b6100a4610074366004610566565b6001600160a01b039283166000908152602081815260408083209490951682529283528381209181529152205490565b60405190815260200160405180910390f35b6100646100c43660046105de565b6101fb565b6100a46100d7366004610678565b6001600160a01b031660009081526001602052604090205490565b336000818152602081815260408083206001600160a01b0387168452825280832085845282528083205493835260019091529020546101329085906106b0565b61013c91906106c8565b33600090815260016020526040902081905561271010156101955760405162461bcd60e51b815260206004820152600e60248201526d26b0bc1020b63637b1b0ba34b7b760911b60448201526064015b60405180910390fd5b336000818152602081815260408083206001600160a01b038716808552908352818420868552835292819020879055518681528493917fa147c6cd0dd0fe2f649713a01540a2dcc9a47d469fb689f358031bf7f2f67011910160405180910390a4505050565b60968511156102425760405162461bcd60e51b8152602060048201526013602482015272546f6f204d616e79204f7065726174696f6e7360681b604482015260640161018c565b8483146102915760405162461bcd60e51b815260206004820152601860248201527f4e66742061727261792073697a65206d6973736d617463680000000000000000604482015260640161018c565b8481146102e05760405162461bcd60e51b815260206004820152601a60248201527f436861696e2061727261792073697a65206d6973736d61746368000000000000604482015260640161018c565b60005b8581101561046f573360009081526020819052604081209086868481811061030d5761030d6106df565b90506020020160208101906103229190610678565b6001600160a01b03166001600160a01b031681526020019081526020016000206000848484818110610356576103566106df565b9050602002013581526020019081526020016000205487878381811061037e5761037e6106df565b336000908152600160209081526040909120546103a29491909202013591506106b0565b6103ac91906106c8565b336000908152600160205260409020558686828181106103ce576103ce6106df565b33600090815260208181526040822092029390930135929091508787858181106103fa576103fa6106df565b905060200201602081019061040f9190610678565b6001600160a01b03166001600160a01b031681526020019081526020016000206000858585818110610443576104436106df565b905060200201358152602001908152602001600020819055508080610467906106f5565b9150506102e3565b503360009081526001602052604090205461271010156104c25760405162461bcd60e51b815260206004820152600e60248201526d26b0bc1020b63637b1b0ba34b7b760911b604482015260640161018c565b336001600160a01b03167f40b9a90d4d04a363a00e6fd9afa85f7336a56acbfad813c80d2030f9390302d2858585858b8b60405161050596959493929190610746565b60405180910390a2505050505050565b80356001600160a01b038116811461052c57600080fd5b919050565b60008060006060848603121561054657600080fd5b8335925061055660208501610515565b9150604084013590509250925092565b60008060006060848603121561057b57600080fd5b61058484610515565b925061055660208501610515565b60008083601f8401126105a457600080fd5b50813567ffffffffffffffff8111156105bc57600080fd5b6020830191508360208260051b85010111156105d757600080fd5b9250929050565b600080600080600080606087890312156105f757600080fd5b863567ffffffffffffffff8082111561060f57600080fd5b61061b8a838b01610592565b9098509650602089013591508082111561063457600080fd5b6106408a838b01610592565b9096509450604089013591508082111561065957600080fd5b5061066689828a01610592565b979a9699509497509295939492505050565b60006020828403121561068a57600080fd5b61069382610515565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156106c3576106c361069a565b500190565b6000828210156106da576106da61069a565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156107095761070961069a565b5060010190565b81835260006001600160fb1b0383111561072957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060808252810186905260008760808301825b89811015610787576001600160a01b0361077284610515565b16825260209283019290910190600101610759565b50838103602085015261079b81888a610710565b91505082810360408401526107b1818587610710565b999850505050505050505056fea26469706673582212208c34b33ea0bd61ea4ea3be29758b1afd2c678dce66229926ed38b43ca6b9168c64736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.