UNPKG

@antefinance/ante-sdk

Version:

Library for interacting with Ante smart contracts

525 lines (524 loc) 17.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.giveawayPoolAbi = void 0; exports.giveawayPoolAbi = [ { type: 'constructor', inputs: [{ name: '_collector', type: 'address', internalType: 'address' }], stateMutability: 'nonpayable', }, { type: 'function', name: 'DOMAIN_SEPARATOR', inputs: [], outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], stateMutability: 'view', }, { type: 'function', name: 'claim', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'participant', type: 'address', internalType: 'address' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'collect', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'collector', inputs: [], outputs: [{ name: '', type: 'address', internalType: 'address' }], stateMutability: 'view', }, { type: 'function', name: 'create', inputs: [ { name: 'params', type: 'tuple', internalType: 'struct IAnteGiveawayPool.CreateCommitmentParams', components: [ { name: 'amount', type: 'uint256', internalType: 'uint256' }, { name: 'joinDetails', type: 'tuple', internalType: 'struct IAnteGiveawayPool.JoinDetails', components: [ { name: 'token', type: 'address', internalType: 'address' }, { name: 'gate', type: 'address', internalType: 'address' }, { name: 'maxParticipants', type: 'uint96', internalType: 'uint96', }, ], }, { name: 'settlementDetails', type: 'tuple', internalType: 'struct IAnteGiveawayPool.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: 'endDate', type: 'uint64', internalType: 'uint64' }, { name: 'payload', type: 'bytes', internalType: 'bytes' }, { name: 'gateData', type: 'bytes', internalType: 'bytes' }, ], }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'getCommitment', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, ], outputs: [ { name: '', type: 'tuple', internalType: 'struct IAnteGiveawayPool.Commitment', components: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'endDate', type: 'uint64', internalType: 'uint64' }, { name: 'committer', type: 'address', internalType: 'address' }, { name: 'status', type: 'uint8', internalType: 'enum IAnteGiveawayPool.CommitmentStatus', }, { name: 'payload', type: 'bytes', internalType: 'bytes' }, { name: 'joinDetails', type: 'tuple', internalType: 'struct IAnteGiveawayPool.JoinDetails', components: [ { name: 'token', type: 'address', internalType: 'address' }, { name: 'gate', type: 'address', internalType: 'address' }, { name: 'maxParticipants', type: 'uint96', internalType: 'uint96', }, ], }, { name: 'settlementDetails', type: 'tuple', internalType: 'struct IAnteGiveawayPool.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: 'participantsCount', type: 'uint256', internalType: 'uint256', }, { name: 'funds', type: 'uint256', internalType: 'uint256' }, { name: 'gateData', type: 'bytes', internalType: 'bytes' }, ], }, ], stateMutability: 'view', }, { type: 'function', name: 'getParticipant', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'account', type: 'address', internalType: 'address' }, ], outputs: [ { name: 'claimedAmount', type: 'uint256', internalType: 'uint256' }, { name: 'joinedAt', type: 'uint256', internalType: 'uint256' }, ], stateMutability: 'view', }, { type: 'function', name: 'join', inputs: [ { name: 'params', type: 'tuple', internalType: 'struct IAnteGiveawayPool.JoinCommitmentParams', components: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'entryKeyData', type: 'bytes', internalType: 'bytes' }, ], }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'nextCommitmentId', inputs: [], outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], stateMutability: 'view', }, { type: 'function', name: 'participants', inputs: [ { name: '', type: 'uint256', internalType: 'uint256' }, { name: '', type: 'address', internalType: 'address' }, ], outputs: [ { name: 'claimedAmount', type: 'uint256', internalType: 'uint256' }, { name: 'joinedAt', type: 'uint256', internalType: 'uint256' }, ], stateMutability: 'view', }, { type: 'function', name: 'refund', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'settle', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'settleWithOutcome', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'isApproved', type: 'bool', internalType: 'bool' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'settleWithSignature', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'settlement', type: 'tuple', internalType: 'struct IAnteGiveawayPool.Settlement', components: [ { name: 'explanation', type: 'string', internalType: 'string' }, { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'isApproved', type: 'bool', internalType: 'bool' }, { 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: 'topUp', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'amount', type: 'uint256', internalType: 'uint256' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'updateCollector', inputs: [ { name: 'newCollector', type: 'address', internalType: 'address' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'function', name: 'updateSettler', inputs: [ { name: 'commitmentId', type: 'uint256', internalType: 'uint256' }, { name: 'newSettler', type: 'address', internalType: 'address' }, { name: 'newSettlerData', type: 'bytes', internalType: 'bytes' }, ], outputs: [], stateMutability: 'nonpayable', }, { type: 'event', name: 'CollectorUpdated', inputs: [ { name: 'oldCollector', type: 'address', indexed: true, internalType: 'address', }, { name: 'newCollector', type: 'address', indexed: true, internalType: 'address', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentCreated', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'author', type: 'address', indexed: true, internalType: 'address', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentSettled', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'isApproved', type: 'bool', indexed: false, internalType: 'bool', }, ], anonymous: false, }, { type: 'event', name: 'CommitmentToppedUp', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'committer', type: 'address', indexed: false, internalType: 'address', }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'CommitterRefunded', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'committer', type: 'address', indexed: false, internalType: 'address', }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'FundsClaimed', inputs: [ { name: 'commitmentId', 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: 'FundsCollected', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'collector', type: 'address', indexed: true, internalType: 'address', }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256', }, ], anonymous: false, }, { type: 'event', name: 'ParticipantJoined', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'participant', type: 'address', indexed: true, internalType: 'address', }, ], anonymous: false, }, { type: 'event', name: 'SettlerUpdated', inputs: [ { name: 'commitmentId', type: 'uint256', indexed: true, internalType: 'uint256', }, { name: 'newSettler', type: 'address', indexed: false, internalType: 'address', }, { name: 'newSettlerData', type: 'bytes', indexed: false, internalType: 'bytes', }, ], 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: 'AlreadyClaimed', inputs: [] }, { type: 'error', name: 'AlreadyJoined', inputs: [] }, { type: 'error', name: 'CommitmentSettled', 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: 'ExpiredSignature', inputs: [] }, { type: 'error', name: 'FailedInnerCall', inputs: [] }, { type: 'error', name: 'FundingRestricted', inputs: [] }, { type: 'error', name: 'GateNotContract', inputs: [] }, { type: 'error', name: 'InvalidAmount', inputs: [] }, { type: 'error', name: 'InvalidCommitment', inputs: [] }, { type: 'error', name: 'InvalidSettleParams', inputs: [] }, { type: 'error', name: 'InvalidSignature', inputs: [] }, { type: 'error', name: 'InvalidStatus', inputs: [] }, { type: 'error', name: 'MaxParticipationReached', inputs: [] }, { type: 'error', name: 'NotAllowed', inputs: [] }, { type: 'error', name: 'NotAllowedByGate', inputs: [] }, { type: 'error', name: 'NotJoined', inputs: [] }, { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] }, { type: 'error', name: 'SafeERC20FailedOperation', inputs: [{ name: 'token', type: 'address', internalType: 'address' }], }, { type: 'error', name: 'SettlementNotEnded', inputs: [] }, { type: 'error', name: 'SettlementUnavailable', inputs: [] }, { type: 'error', name: 'SettlerNotContract', inputs: [] }, { type: 'error', name: 'UnsupportedToken', inputs: [] }, ];