UNPKG

@mantleio/contracts

Version:
877 lines (876 loc) 20.4 kB
{ "_format": "hh-sol-artifact-1", "contractName": "DelegationManager", "sourceName": "contracts/L1/delegation/DelegationManager.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "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" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "depositor", "type": "address" }, { "indexed": true, "internalType": "address", "name": "withdrawer", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "withdrawalRoot", "type": "bytes32" } ], "name": "WithdrawalCompleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "depositor", "type": "address" }, { "indexed": true, "internalType": "address", "name": "withdrawer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "delegatedAddress", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "withdrawalRoot", "type": "bytes32" } ], "name": "WithdrawalQueued", "type": "event" }, { "inputs": [], "name": "DEPOSIT_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "REASONABLE_STAKES_UPDATE_PERIOD", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "WITHDRAWAL_WAITING_PERIOD", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "toAddAddresses", "type": "address[]" } ], "name": "addToWhitelist", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "contract IDelegationShare[]", "name": "delegations", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" }, { "internalType": "address", "name": "depositor", "type": "address" }, { "components": [ { "internalType": "address", "name": "withdrawer", "type": "address" }, { "internalType": "uint96", "name": "nonce", "type": "uint96" } ], "internalType": "struct IDelegationManager.WithdrawerAndNonce", "name": "withdrawerAndNonce", "type": "tuple" }, { "internalType": "address", "name": "delegatedAddress", "type": "address" } ], "internalType": "struct IDelegationManager.QueuedWithdrawal", "name": "queuedWithdrawal", "type": "tuple" } ], "name": "calculateWithdrawalRoot", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "contract IDelegationShare[]", "name": "delegations", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" }, { "internalType": "address", "name": "depositor", "type": "address" }, { "components": [ { "internalType": "address", "name": "withdrawer", "type": "address" }, { "internalType": "uint96", "name": "nonce", "type": "uint96" } ], "internalType": "struct IDelegationManager.WithdrawerAndNonce", "name": "withdrawerAndNonce", "type": "tuple" }, { "internalType": "address", "name": "delegatedAddress", "type": "address" } ], "internalType": "struct IDelegationManager.QueuedWithdrawal", "name": "queuedWithdrawal", "type": "tuple" } ], "name": "canCompleteQueuedWithdrawal", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "contract IDelegationShare[]", "name": "delegations", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" }, { "internalType": "address", "name": "depositor", "type": "address" }, { "components": [ { "internalType": "address", "name": "withdrawer", "type": "address" }, { "internalType": "uint96", "name": "nonce", "type": "uint96" } ], "internalType": "struct IDelegationManager.WithdrawerAndNonce", "name": "withdrawerAndNonce", "type": "tuple" }, { "internalType": "address", "name": "delegatedAddress", "type": "address" } ], "internalType": "struct IDelegationManager.QueuedWithdrawal", "name": "queuedWithdrawal", "type": "tuple" }, { "internalType": "bool", "name": "receiveAsTokens", "type": "bool" } ], "name": "completeQueuedWithdrawal", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "delegation", "outputs": [ { "internalType": "contract IDelegation", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "delegationSlasher", "outputs": [ { "internalType": "contract IDelegationSlasher", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IDelegationShare", "name": "delegationShare", "type": "address" }, { "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "depositInto", "outputs": [ { "internalType": "uint256", "name": "shares", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "depositor", "type": "address" } ], "name": "getDeposits", "outputs": [ { "internalType": "contract IDelegationShare[]", "name": "", "type": "address[]" }, { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "initialOwner", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "staker", "type": "address" } ], "name": "investorDelegationLength", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "contract IDelegationShare", "name": "", "type": "address" } ], "name": "investorDelegationShares", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "investorDelegations", "outputs": [ { "internalType": "contract IDelegationShare", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "nonces", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "numWithdrawalsQueued", "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": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "delegationIndexes", "type": "uint256[]" }, { "internalType": "contract IDelegationShare[]", "name": "delegationShares", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" }, { "components": [ { "internalType": "address", "name": "withdrawer", "type": "address" }, { "internalType": "uint96", "name": "nonce", "type": "uint96" } ], "internalType": "struct IDelegationManager.WithdrawerAndNonce", "name": "withdrawerAndNonce", "type": "tuple" }, { "internalType": "bool", "name": "undelegateIfPossible", "type": "bool" } ], "name": "queueWithdrawal", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "queuedWithdrawals", "outputs": [ { "internalType": "uint32", "name": "initTimestamp", "type": "uint32" }, { "internalType": "uint32", "name": "unlockTimestamp", "type": "uint32" }, { "internalType": "address", "name": "withdrawer", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "toRemoveAddresses", "type": "address[]" } ], "name": "removeFromWhitelist", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "components": [ { "internalType": "contract IDelegationShare[]", "name": "delegations", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" }, { "internalType": "address", "name": "depositor", "type": "address" }, { "components": [ { "internalType": "address", "name": "withdrawer", "type": "address" }, { "internalType": "uint96", "name": "nonce", "type": "uint96" } ], "internalType": "struct IDelegationManager.WithdrawerAndNonce", "name": "withdrawerAndNonce", "type": "tuple" }, { "internalType": "address", "name": "delegatedAddress", "type": "address" } ], "internalType": "struct IDelegationManager.QueuedWithdrawal", "name": "queuedWithdrawal", "type": "tuple" } ], "name": "slashQueuedWithdrawal", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "slashedAddress", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "contract IDelegationShare[]", "name": "delegationShares", "type": "address[]" }, { "internalType": "contract IERC20[]", "name": "tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "delegationIndexes", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "shareAmounts", "type": "uint256[]" } ], "name": "slashShares", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "withdrawalRoot", "type": "bytes32" }, { "internalType": "uint32", "name": "stakeInactiveAfter", "type": "uint32" } ], "name": "startQueuedWithdrawalWaitingPeriod", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "undelegate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "whitelist", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }