UNPKG

@antefinance/ante-sdk

Version:

Library for interacting with Ante smart contracts

570 lines (569 loc) 15.6 kB
export const metaPoolV002Abi = [ { type: 'function', name: 'DOMAIN_SEPARATOR', inputs: [], outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], stateMutability: 'view', }, { type: 'function', name: 'cancellationInitiatedBy', inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], outputs: [{ name: '', type: 'address', internalType: 'address' }], stateMutability: 'view', }, { type: 'function', name: 'create', inputs: [ { name: 'params', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.CreateCommitmentParams', components: [ { name: 'joinDetails', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.JoinDetails', components: [ { name: 'minStake', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.Stake', components: [ { name: 'token', type: 'address', internalType: 'address', }, { name: 'amount', type: 'uint256', internalType: 'uint256', }, ], }, { name: 'joinStart', type: 'uint48', internalType: 'uint48', }, { name: 'joinEnd', type: 'uint48', internalType: 'uint48' }, { name: 'gate', type: 'address', internalType: 'address' }, ], }, { name: 'settlementDetails', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.SettlementDetails', components: [ { name: 'settler', type: 'address', internalType: 'address', }, { name: 'settleStart', type: 'uint48', internalType: 'uint48', }, { name: 'settleEnd', type: 'uint48', internalType: 'uint48', }, { name: 'settlerData', type: 'bytes', internalType: 'bytes', }, ], }, { name: 'payload', type: 'bytes', internalType: 'bytes' }, { name: 'stakeAmount', type: 'uint256', internalType: 'uint256', }, { name: 'endDate', type: 'uint64', internalType: 'uint64' }, { name: 'oddMultiplier', type: 'uint256', internalType: 'uint256', }, { name: 'gateData', type: 'bytes', internalType: 'bytes' }, { name: 'isCancellable', type: 'bool', internalType: 'bool' }, ], }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'getCommitment', inputs: [{ name: 'anteId', type: 'uint256', internalType: 'uint256' }], outputs: [ { name: '', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.Commitment', components: [ { name: 'anteId', type: 'uint96', internalType: 'uint96' }, { name: 'endDate', type: 'uint64', internalType: 'uint64' }, { name: 'firstParticipantA', type: 'address', internalType: 'address', }, { name: 'status', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.CommitmentStatus', }, { name: 'winningSide', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'firstParticipantB', type: 'address', internalType: 'address', }, { name: 'isCancellable', type: 'bool', internalType: 'bool' }, { name: 'payload', type: 'bytes', internalType: 'bytes' }, { name: 'oddMultiplier', type: 'uint256', internalType: 'uint256', }, { name: 'joinDetails', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.JoinDetails', components: [ { name: 'minStake', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.Stake', components: [ { name: 'token', type: 'address', internalType: 'address', }, { name: 'amount', type: 'uint256', internalType: 'uint256', }, ], }, { name: 'joinStart', type: 'uint48', internalType: 'uint48', }, { name: 'joinEnd', type: 'uint48', internalType: 'uint48' }, { name: 'gate', type: 'address', internalType: 'address' }, ], }, { name: 'settlementDetails', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.SettlementDetails', components: [ { name: 'settler', type: 'address', internalType: 'address', }, { name: 'settleStart', type: 'uint48', internalType: 'uint48', }, { name: 'settleEnd', type: 'uint48', internalType: 'uint48', }, { name: 'settlerData', type: 'bytes', internalType: 'bytes', }, ], }, ], }, ], stateMutability: 'view', }, { type: 'function', name: 'getParticipant', inputs: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'account', type: 'address', internalType: 'address' }, ], outputs: [ { name: 'position', type: 'uint256', internalType: 'uint256' }, { name: 'side', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'totalAtEntry', type: 'uint256', internalType: 'uint256' }, { name: 'balance', type: 'uint256', internalType: 'uint256' }, ], stateMutability: 'view', }, { type: 'function', name: 'getTotalStake', inputs: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'side', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, ], outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], stateMutability: 'view', }, { type: 'function', name: 'join', inputs: [ { name: 'params', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.JoinCommitmentParams', components: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'side', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'stakeAmount', type: 'uint256', internalType: 'uint256', }, { name: 'entryKeyData', type: 'bytes', internalType: 'bytes' }, ], }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'mutuallyCancel', inputs: [{ name: 'anteId', type: 'uint256', internalType: 'uint256' }], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'nextId', inputs: [], outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], stateMutability: 'view', }, { type: 'function', name: 'settle', inputs: [{ name: 'anteId', type: 'uint256', internalType: 'uint256' }], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'settleWithSignature', inputs: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'settlement', type: 'tuple', internalType: 'struct IAnteMetaPoolV01.Settlement', components: [ { name: 'explanation', type: 'string', internalType: 'string' }, { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'winningSide', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'deadline', type: 'uint256', internalType: 'uint256' }, { name: 'v', type: 'uint8', internalType: 'uint8' }, { name: 'r', type: 'bytes32', internalType: 'bytes32' }, { name: 's', type: 'bytes32', internalType: 'bytes32' }, ], }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'totalStakes', inputs: [ { name: '', type: 'uint256', internalType: 'uint256' }, { name: '', type: 'uint8', internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, ], outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], stateMutability: 'view', }, { type: 'function', name: 'withdrawRefundTo', inputs: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'to', type: 'address', internalType: 'address' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'withdrawTo', inputs: [ { name: 'anteId', type: 'uint256', internalType: 'uint256' }, { name: 'to', type: 'address', internalType: 'address' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'event', name: 'CancellationInitiated', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'initiator', type: 'address', indexed: false, internalType: 'address', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentCanceled', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentCreated', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'author', type: 'address', indexed: true, internalType: 'address', }, { name: 'side', type: 'uint8', indexed: false, internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'stakeAmount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentSettled', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'settler', type: 'address', indexed: true, internalType: 'address', }, { name: 'submitter', type: 'address', indexed: false, internalType: 'address', }, { name: 'winningSide', type: 'uint8', indexed: false, internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, ], anonymous: false, }, { type: 'event', name: 'ParticipantJoined', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'participant', type: 'address', indexed: true, internalType: 'address', }, { name: 'side', type: 'uint8', indexed: false, internalType: 'enum IAnteMetaPoolV01.ParticipantSide', }, { name: 'stakeAmount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'Withdraw', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'participant', type: 'address', indexed: true, internalType: 'address', }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'WithdrawRefund', inputs: [ { name: 'anteId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'to', type: 'address', indexed: true, internalType: 'address', }, ], anonymous: false, }, { type: 'error', name: 'AddressEmptyCode', inputs: [{ name: 'target', type: 'address', internalType: 'address' }], }, { type: 'error', name: 'AddressInsufficientBalance', inputs: [{ name: 'account', type: 'address', internalType: 'address' }], }, { type: 'error', name: 'AlreadyInitiated', inputs: [] }, { type: 'error', name: 'AlreadyJoined', inputs: [] }, { type: 'error', name: 'ECDSAInvalidSignature', inputs: [] }, { type: 'error', name: 'ECDSAInvalidSignatureLength', inputs: [{ name: 'length', type: 'uint256', internalType: 'uint256' }], }, { type: 'error', name: 'ECDSAInvalidSignatureS', inputs: [{ name: 's', type: 'bytes32', internalType: 'bytes32' }], }, { type: 'error', name: 'EmptyBalance', inputs: [] }, { type: 'error', name: 'ExpiredSignature', inputs: [] }, { type: 'error', name: 'FailedInnerCall', inputs: [] }, { type: 'error', name: 'GateNotContract', inputs: [] }, { type: 'error', name: 'InvalidCommitment', inputs: [] }, { type: 'error', name: 'InvalidJoinParams', inputs: [] }, { type: 'error', name: 'InvalidSettleParams', inputs: [] }, { type: 'error', name: 'InvalidSettler', inputs: [] }, { type: 'error', name: 'InvalidSide', inputs: [] }, { type: 'error', name: 'InvalidSignature', inputs: [] }, { type: 'error', name: 'InvalidStatus', inputs: [] }, { type: 'error', name: 'MinStakeRequired', inputs: [{ name: 'minStake', type: 'uint256', internalType: 'uint256' }], }, { type: 'error', name: 'NoMinStake', inputs: [] }, { type: 'error', name: 'NotAllowed', inputs: [] }, { type: 'error', name: 'NotAllowedByGate', inputs: [] }, { type: 'error', name: 'NotCancellable', inputs: [] }, { type: 'error', name: 'OutsideJoinPeriod', inputs: [] }, { type: 'error', name: 'PendingSettlement', inputs: [] }, { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] }, { type: 'error', name: 'SafeERC20FailedOperation', inputs: [{ name: 'token', type: 'address', internalType: 'address' }], }, { type: 'error', name: 'SettlementUnavailable', inputs: [] }, { type: 'error', name: 'SettlerNotContract', inputs: [] }, ] as const;