@soma-finance/core-contracts
Version:
SOMA Finance core contracts
695 lines (694 loc) • 15 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "ISomaEarn",
"sourceName": "contracts/soma/SomaEarn/ISomaEarn.sol",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint48",
"name": "prevStartDate",
"type": "uint48"
},
{
"indexed": false,
"internalType": "uint48",
"name": "prevEndDate",
"type": "uint48"
},
{
"indexed": false,
"internalType": "uint48",
"name": "newStartDate",
"type": "uint48"
},
{
"indexed": false,
"internalType": "uint48",
"name": "newEndDate",
"type": "uint48"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "DatesUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "DelegationAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint8",
"name": "percentLocked",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "lockDuration",
"type": "uint8"
}
],
"indexed": false,
"internalType": "struct ISomaEarn.DelegationConfig",
"name": "prevConfig",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint8",
"name": "percentLocked",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "lockDuration",
"type": "uint8"
}
],
"indexed": false,
"internalType": "struct ISomaEarn.DelegationConfig",
"name": "newConfig",
"type": "tuple"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "DelegationConfigUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "fromPoolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "toPoolId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "DelegationMoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxUserDelegation",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxTotalDelegation",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bool",
"name": "enabled",
"type": "bool"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "PoolUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "TokenCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "prevTo",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newTo",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "WithdrawToUpdated",
"type": "event"
},
{
"inputs": [],
"name": "GLOBAL_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "LOCAL_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SOMA_EARN_TOKEN",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "asset",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "delegationConfig",
"outputs": [
{
"components": [
{
"internalType": "uint8",
"name": "percentLocked",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "lockDuration",
"type": "uint8"
}
],
"internalType": "struct ISomaEarn.DelegationConfig",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "enabled",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "endDate",
"outputs": [
{
"internalType": "uint48",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "id",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_id",
"type": "uint256"
},
{
"internalType": "address",
"name": "_asset",
"type": "address"
},
{
"internalType": "address",
"name": "_withdrawTo",
"type": "address"
},
{
"internalType": "uint48",
"name": "_startDate",
"type": "uint48"
},
{
"internalType": "uint48",
"name": "_endDate",
"type": "uint48"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "maxTotalDelegation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "maxUserDelegation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "fromPoolId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "toPoolId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "moveDelegation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "requiredPrivileges",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "setWithdrawTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "startDate",
"outputs": [
{
"internalType": "uint48",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "token",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint48",
"name": "newStartDate",
"type": "uint48"
},
{
"internalType": "uint48",
"name": "newEndDate",
"type": "uint48"
}
],
"name": "updateDateConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint8",
"name": "percentLocked",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "lockDuration",
"type": "uint8"
}
],
"internalType": "struct ISomaEarn.DelegationConfig",
"name": "newConfig",
"type": "tuple"
}
],
"name": "updateDelegationConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "maxUserDelegation",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTotalDelegation",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "enabled",
"type": "bool"
}
],
"name": "updatePool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "userDelegation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawTo",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}