@soma-finance/core-contracts
Version:
SOMA Finance core contracts
1,922 lines • 123 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "SomaStarter",
"sourceName": "contracts/soma/SomaStarter/SomaStarter.sol",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "address_",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
}
],
"name": "AccountLimitChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "FeeWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"name": "ImmediatelyUnlockingPartUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "unlockingPart",
"type": "uint256"
}
],
"name": "IntervalCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "IntervalPoolUnlocking",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "IssuanceIncreased",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LinearPoolUnlocking",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "LinearUnlockingEndingTimestampUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newLimit",
"type": "uint256"
}
],
"name": "PaymentLimitChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "PaymentLimitCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "unlockedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collectedFee",
"type": "uint256"
}
],
"name": "PaymentUnlocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "PaymentsWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "enum SomaStarter.Type",
"name": "type_",
"type": "uint8"
},
{
"indexed": true,
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"indexed": true,
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "rate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "paymentLimit",
"type": "uint256"
}
],
"name": "PoolCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "PoolOwnerChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "nominatedOwner",
"type": "address"
}
],
"name": "PoolOwnerNominated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "newRequiredPrivileges",
"type": "bytes32"
}
],
"name": "PoolPrivilegesChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "requestedPaymentAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "paymentAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "issuanceAmount",
"type": "uint256"
}
],
"name": "Swap",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "TokensRecovered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "UnsoldWithdrawn",
"type": "event"
},
{
"inputs": [],
"name": "GLOBAL_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GLOBAL_WHITELIST_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "LOCAL_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "LOCAL_WHITELIST_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SOMA",
"outputs": [
{
"internalType": "contract ISOMA",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TOKEN_RECOVERY_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "acceptPoolOwnership",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "newLimit",
"type": "uint256"
}
],
"name": "changeLimit",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "collectFee",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "collectedFees",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "paymentLimit",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
},
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "immediatelyUnlockingPart",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "unlockingPart",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Interval[]",
"name": "intervals",
"type": "tuple[]"
}
],
"name": "createIntervalPool",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "paymentLimit",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
},
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "immediatelyUnlockingPart",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "linearUnlockingEndsAt",
"type": "uint256"
}
],
"name": "createLinearPool",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "createPaymentLimit",
"outputs": [
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "paymentLimit",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
},
{
"internalType": "address",
"name": "owner_",
"type": "address"
}
],
"name": "createSimplePool",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "increaseIssuance",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "address_",
"type": "address"
}
],
"name": "intervalPoolAccount",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "paymentSum",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.AccountState",
"name": "state",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "issuanceAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "withdrawnIssuanceAmount",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.ComplexAccountState",
"name": "complex",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "unlockedIntervalsCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "intervalPoolProps",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "immediatelyUnlockingPart",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "unlockingPart",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Interval[]",
"name": "intervals",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "address_",
"type": "address"
}
],
"name": "linearPoolAccount",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "paymentSum",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.AccountState",
"name": "state",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "issuanceAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "withdrawnIssuanceAmount",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.ComplexAccountState",
"name": "complex",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "immediatelyUnlockedAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "linearPoolProps",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "immediatelyUnlockingPart",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.LinearProps",
"name": "linear",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "multicall",
"outputs": [
{
"internalType": "bytes[]",
"name": "results",
"type": "bytes[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "nominatedOwner_",
"type": "address"
}
],
"name": "nominateNewPoolOwner",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "address_",
"type": "address"
}
],
"name": "poolAccount",
"outputs": [
{
"internalType": "enum SomaStarter.Type",
"name": "type_",
"type": "uint8"
},
{
"components": [
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "paymentSum",
"type": "uint256"
}
],
"internalType": "struct SomaStarter.AccountState",
"name": "state",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "poolProps",
"outputs": [
{
"internalType": "enum SomaStarter.Type",
"name": "type_",
"type": "uint8"
},
{
"components": [
{
"internalType": "uint256",
"name": "issuanceLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startsAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endsAt",
"type": "uint256"
},
{
"internalType": "contract IERC20",
"name": "paymentToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "issuanceToken",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "fee",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "mantissa",
"type": "uint256"
}
],
"internalType": "struct AttoDecimal.Instance",
"name": "rate",
"type": "tuple"
}
],
"internalType": "struct SomaStarter.Props",
"name": "props",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "poolState",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "available",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "issuance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedPayments",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "unlockedPayments",
"type": "uint256"
},
{
"internalType": "address",
"name": "nominatedOwner",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "paymentLimits",
"type": "uint256[]"
},
{
"internalType": "bytes32",
"name": "requiredPrivileges",
"type": "bytes32"
}
],
"internalType": "struct SomaStarter.State",
"name": "state",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolsCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "recoverTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limitIndex",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "accounts",
"type": "address[]"
}
],
"name": "setAccountsLimit",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "requestedPaymentAmount",
"type": "uint256"
}
],
"name": "swap",
"outputs": [
{
"internalType": "uint256",
"name": "paymentAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "issuanceAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "intervalIndex",
"type": "uint256"
}
],
"name": "unlockInterval",
"outputs": [
{
"internalType": "uint256",
"name": "withdrawnIssuanceAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "unlockLinear",
"outputs": [
{
"internalType": "uint256",
"name": "withdrawalAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "newRequiredPrivileges",
"type": "bytes32"
}
],
"name": "updateRequiredPrivileges",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "withdrawFee",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "withdrawPayments",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "withdrawUnsold",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60a0604052730f3dc00189dbcd1d0c574e48031270cae04c4adf60805234801561002857600080fd5b506001600055608051614bb9610081600039600081816103ce015281816108d801528181610bdb01528181610c7701528181610f1c015281816115c7015281816116630152818161174601526122170152614bb96000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638456cb5911610146578063b333ad87116100c3578063e2481dbd11610087578063e2481dbd146105d6578063e43b1560146105e0578063ee90ac8214610601578063f0f2192014610614578063f63d8d3214610627578063f6f94e2c1461063a57600080fd5b8063b333ad871461051c578063c879c6d81461052f578063ceec13ff14610542578063d869759814610587578063d96073cf146105ae57600080fd5b8063a123ada71161010a578063a123ada7146104b0578063a90101fb146104c3578063a969ff0a146104d6578063ac9650d8146104e9578063ae4ff9dc1461050957600080fd5b80638456cb59146104585780638c788de01461046057806391d148541461046957806398ecde321461047c5780639a419e2e1461049d57600080fd5b806346f75858116101d457806363727fc21161019857806363727fc2146103c957806366258068146104085780636ccc56cd1461041d57806376d6ffa11461043d5780638129fc1c1461045057600080fd5b806346f758581461037c57806348796f3a1461038f5780634fdf5539146103995780635c975abb146103ae5780635f3e849f146103b657600080fd5b806326338c611161021b57806326338c61146103005780632e2ec9e6146103135780632f9afafc1461033d5780633f4ba83a1461035f57806341975af81461036957600080fd5b806301ffc9a714610258578063059332ec146102805780631cead9a7146102a257806323fc3136146102da578063248a9ca3146102ed575b600080fd5b61026b610266366004613f2e565b61064d565b60405190151581526020015b60405180910390f35b61029361028e366004613f58565b610678565b60405161027793929190613fc5565b6102cc6102b0366004614008565b6001600160a01b03166000908152610165602052604090205490565b604051908152602001610277565b61026b6102e83660046140b9565b610759565b6102cc6102fb366004613f58565b6108d4565b61026b61030e36600461416d565b6109c6565b610326610321366004614277565b610a26565b604080519215158352602083019190915201610277565b61035061034b366004613f58565b610a9c565b604051610277939291906142c3565b610367610bca565b005b61026b610377366004613f58565b610d59565b61026b61038a366004613f58565b610e38565b6102cc6101635481565b6102cc600080516020614b4683398151915281565b61026b610f18565b6103676103c4366004614330565b610fb1565b6103f07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b6102cc600080516020614b6683398151915281565b61043061042b366004613f58565b611122565b60405161027791906143ac565b6102cc61044b366004613f58565b611229565b610367611413565b6103676115b6565b610164546102cc565b61026b610477366004614429565b611742565b61048f61048a366004613f58565b611840565b604051610277929190614491565b6102cc6104ab36600461416d565b6118d4565b6103266104be3660046144ad565b611988565b61026b6104d1366004614429565b611ac3565b61026b6104e4366004613f58565b611bb1565b6104fc6104f7366004614515565b611c15565b60405161027791906145da565b61026b610517366004613f58565b611d03565b61026b61052a36600461416d565b611e09565b61026b61053d36600461463c565b611f98565b610555610550366004614429565b6120b3565b60408051845181526020948501518582015283519181019190915292909101516060830152608082015260a001610277565b6102cc7f0b8459b722d944f0580da74c767d2dcae280ce16527c19c825b302a24e208dfd81565b6105c16105bc36600461416d565b612154565b60408051928352602083019190915201610277565b6102cc6101625481565b6105f36105ee366004614429565b61263e565b60405161027792919061466a565b61026b61060f36600461468f565b6126ad565b6103266106223660046146bb565b61277c565b610555610635366004614429565b612a1f565b6102cc61064836600461416d565b612ac0565b60006001600160e01b03198216638757f10760e01b1480610672575061067282612d09565b92915050565b610680613e58565b604080516020810190915260008152604080518082019091526000808252602082015260006106ae85612d2e565b90506106b981612dac565b6040805160e08101825260038301548152600483015460208083019190915260058401548284015260068401546001600160a01b0390811660608401526007850154166080830152825180820184526008850154815260a0830152825180820184526009850154815260c083015282518082018452600285015481528351808501909452600a8501548452600b9094015490830152969195509350915050565b600033610774600080516020614b4683398151915282611742565b8061078757506107876101635482611742565b6107ac5760405162461bcd60e51b81526004016107a3906147ca565b60405180910390fd5b60006107b786612d2e565b90506107c38186612e11565b83518061081c5760405162461bcd60e51b815260206004820152602160248201527f536f6d61537461727465723a204e4f5f4143434f554e54535f50524f564944456044820152601160fa1b60648201526084016107a3565b60005b818110156108c657600086828151811061083b5761083b614801565b6020908102919091018101516001600160a01b03811660009081526015870190925260409091208054919250908990036108765750506108b4565b88815560405189906001600160a01b038416908c907fd98eb3f94d757b6a35fcfb91cf696b9bc1a78ec87a7378e0b0429bc21386bb3b90600090a450505b806108be8161482d565b91505061081f565b506001979650505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610934573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109589190614846565b6001600160a01b031663248a9ca3836040518263ffffffff1660e01b8152600401610985918152