@antefinance/ante-sdk
Version:
Library for interacting with Ante smart contracts
534 lines (533 loc) • 17.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.grantPoolV2Abi = void 0;
exports.grantPoolV2Abi = [
{
type: 'constructor',
inputs: [{ name: '_proxyImpl', type: 'address', internalType: 'address' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'DOMAIN_SEPARATOR',
inputs: [],
outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
name: 'create',
inputs: [
{
name: 'params',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.CreateGrantParams',
components: [
{
name: 'fundingDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.FundingDetails',
components: [
{ name: 'token', type: 'address', internalType: 'address' },
{ name: 'minLockup', type: 'uint256', internalType: 'uint256' },
],
},
{
name: 'settlementDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.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: 'grantee', type: 'address', internalType: 'address' },
{ name: 'payload', type: 'bytes32', internalType: 'bytes32' },
],
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'donationProxyImpl',
inputs: [],
outputs: [{ name: '', type: 'address', internalType: 'address' }],
stateMutability: 'view',
},
{
type: 'function',
name: 'fund',
inputs: [
{
name: 'params',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.FundGrantParams',
components: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'amount', type: 'uint256', internalType: 'uint256' },
{ name: 'unlockAt', type: 'uint256', internalType: 'uint256' },
],
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'funders',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'funderAddr', type: 'address', internalType: 'address' },
],
outputs: [
{ name: 'amount', type: 'uint256', internalType: 'uint256' },
{ name: 'unlockAt', type: 'uint256', internalType: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'getDonationProxyParams',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [
{ name: 'salt', type: 'bytes32', internalType: 'bytes32' },
{ name: 'initCode', type: 'bytes', internalType: 'bytes' },
{ name: 'computedAddr', type: 'address', internalType: 'address' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'getFunder',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'account', type: 'address', internalType: 'address' },
],
outputs: [
{ name: 'position', type: 'uint256', internalType: 'uint256' },
{ name: 'balance', type: 'uint256', internalType: 'uint256' },
{ name: 'unlockAt', type: 'uint256', internalType: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'getGrant',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [
{
name: '',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.Grant',
components: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'endDate', type: 'uint64', internalType: 'uint64' },
{ name: 'grantee', type: 'address', internalType: 'address' },
{ name: 'payload', type: 'bytes32', internalType: 'bytes32' },
{
name: 'fundingDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.FundingDetails',
components: [
{ name: 'token', type: 'address', internalType: 'address' },
{ name: 'minLockup', type: 'uint256', internalType: 'uint256' },
],
},
{
name: 'settlementDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.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: 'getGrantDetails',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [
{
name: '',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.GrantDetails',
components: [
{
name: 'status',
type: 'uint8',
internalType: 'enum IAnteGrantPoolV2.GrantStatus',
},
{ name: 'depositedAmount', type: 'uint256', internalType: 'uint256' },
{ name: 'depositors', type: 'uint256', internalType: 'uint256' },
],
},
],
stateMutability: 'view',
},
{
type: 'function',
name: 'grantDetails',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [
{
name: 'status',
type: 'uint8',
internalType: 'enum IAnteGrantPoolV2.GrantStatus',
},
{ name: 'depositedAmount', type: 'uint256', internalType: 'uint256' },
{ name: 'depositors', type: 'uint256', internalType: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'nextGrantId',
inputs: [],
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
name: 'settle',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'settleWithOutcome',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'isApproved', type: 'bool', internalType: 'bool' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'settleWithSignature',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{
name: 'settlement',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.Settlement',
components: [
{ name: 'explanation', type: 'string', internalType: 'string' },
{ name: 'grantId', 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: 'update',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{
name: 'params',
type: 'tuple',
internalType: 'struct IAnteGrantPoolV2.UpdateGrantParams',
components: [
{ name: 'payload', type: 'bytes32', internalType: 'bytes32' },
],
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'updateSettler',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'newSettler', type: 'address', internalType: 'address' },
{ name: 'newSettlerData', type: 'bytes', internalType: 'bytes' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'withdraw',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'funder', type: 'address', internalType: 'address' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'withdrawEth',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'withdrawTokens',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'token', type: 'address', internalType: 'address' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'event',
name: 'EthWithdrawn',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'amount',
type: 'uint256',
indexed: false,
internalType: 'uint256',
},
],
anonymous: false,
},
{
type: 'event',
name: 'FundsWithdrawn',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'funder',
type: 'address',
indexed: true,
internalType: 'address',
},
{
name: 'amount',
type: 'uint256',
indexed: false,
internalType: 'uint256',
},
],
anonymous: false,
},
{
type: 'event',
name: 'GrantCreated',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'author',
type: 'address',
indexed: true,
internalType: 'address',
},
{
name: 'grantee',
type: 'address',
indexed: true,
internalType: 'address',
},
],
anonymous: false,
},
{
type: 'event',
name: 'GrantFunded',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'funder',
type: 'address',
indexed: true,
internalType: 'address',
},
{
name: 'amount',
type: 'uint256',
indexed: false,
internalType: 'uint256',
},
],
anonymous: false,
},
{
type: 'event',
name: 'GrantSettled',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'isApproved',
type: 'bool',
indexed: false,
internalType: 'bool',
},
],
anonymous: false,
},
{
type: 'event',
name: 'GrantUpdated',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'author',
type: 'address',
indexed: true,
internalType: 'address',
},
{
name: 'payload',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
],
anonymous: false,
},
{
type: 'event',
name: 'SettlerUpdated',
inputs: [
{
name: 'grantId',
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: 'event',
name: 'TokensWithdrawn',
inputs: [
{
name: 'grantId',
type: 'uint256',
indexed: true,
internalType: 'uint256',
},
{
name: 'token',
type: 'address',
indexed: false,
internalType: 'address',
},
{
name: 'amount',
type: 'uint256',
indexed: false,
internalType: 'uint256',
},
],
anonymous: false,
},
{ type: 'error', name: 'Create2EmptyBytecode', 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: 'FailedDeployment', inputs: [] },
{ type: 'error', name: 'FundingRestricted', inputs: [] },
{ type: 'error', name: 'GrantSettled', inputs: [] },
{
type: 'error',
name: 'InsufficientBalance',
inputs: [
{ name: 'balance', type: 'uint256', internalType: 'uint256' },
{ name: 'needed', type: 'uint256', internalType: 'uint256' },
],
},
{ type: 'error', name: 'InvalidAmount', inputs: [] },
{ type: 'error', name: 'InvalidGrant', inputs: [] },
{ type: 'error', name: 'InvalidGrantee', inputs: [] },
{ type: 'error', name: 'InvalidLockTime', inputs: [] },
{ type: 'error', name: 'InvalidSettleParams', inputs: [] },
{ type: 'error', name: 'InvalidSignature', inputs: [] },
{ type: 'error', name: 'InvalidStatus', inputs: [] },
{ type: 'error', name: 'LockedFunds', inputs: [] },
{ type: 'error', name: 'NotAllowed', 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: [] },
{
type: 'error',
name: 'TokensWithdrawalFailed',
inputs: [
{ name: 'revertReason', type: 'bytes32', internalType: 'bytes32' },
],
},
{ type: 'error', name: 'UnsupportedToken', inputs: [] },
];