@antefinance/ante-sdk
Version:
Library for interacting with Ante smart contracts
373 lines (372 loc) • 13.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.grantPoolAbi = void 0;
exports.grantPoolAbi = [
{
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 IAnteGrantPool.CreateGrantParams',
components: [
{
name: 'fundingDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPool.FundingDetails',
components: [
{ name: 'token', type: 'address', internalType: 'address' },
{ name: 'gate', type: 'address', internalType: 'address' },
],
},
{
name: 'settlementDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPool.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: 'bytes', internalType: 'bytes' },
{ name: 'gateData', type: 'bytes', internalType: 'bytes' },
],
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'denyAndRefund',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'funder', type: 'address', internalType: 'address' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'fund',
inputs: [
{
name: 'params',
type: 'tuple',
internalType: 'struct IAnteGrantPool.FundGrantParams',
components: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'amount', type: 'uint256', internalType: 'uint256' },
{ name: 'entryKeyData', type: 'bytes', internalType: 'bytes' },
],
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'funders',
inputs: [
{ name: '', type: 'uint256', internalType: 'uint256' },
{ name: '', type: 'address', internalType: 'address' },
],
outputs: [{ name: 'amount', type: 'uint256', internalType: 'uint256' }],
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' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'getGrant',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [
{
name: '',
type: 'tuple',
internalType: 'struct IAnteGrantPool.Grant',
components: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'endDate', type: 'uint64', internalType: 'uint64' },
{ name: 'grantee', type: 'address', internalType: 'address' },
{
name: 'status',
type: 'uint8',
internalType: 'enum IAnteGrantPool.GrantStatus',
},
{ name: 'payload', type: 'bytes', internalType: 'bytes' },
{
name: 'fundingDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPool.FundingDetails',
components: [
{ name: 'token', type: 'address', internalType: 'address' },
{ name: 'gate', type: 'address', internalType: 'address' },
],
},
{
name: 'settlementDetails',
type: 'tuple',
internalType: 'struct IAnteGrantPool.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: 'grantTotals',
inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
outputs: [
{ name: 'funds', type: 'uint256', internalType: 'uint256' },
{ name: 'funders', type: 'uint256', internalType: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
name: 'nextGrantId',
inputs: [],
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
name: 'refund',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{ name: 'funder', type: 'address', internalType: 'address' },
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'settle',
inputs: [{ name: 'grantId', type: 'uint256', internalType: 'uint256' }],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'settleWithSignature',
inputs: [
{ name: 'grantId', type: 'uint256', internalType: 'uint256' },
{
name: 'settlement',
type: 'tuple',
internalType: 'struct IAnteGrantPool.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: 'event',
name: 'FunderRefunded',
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: 'error',
name: 'AddressEmptyCode',
inputs: [{ name: 'target', type: 'address', internalType: 'address' }],
},
{
type: 'error',
name: 'AddressInsufficientBalance',
inputs: [{ name: 'account', type: 'address', internalType: 'address' }],
},
{ 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: 'GrantSettled', inputs: [] },
{ type: 'error', name: 'InvalidAmount', inputs: [] },
{ type: 'error', name: 'InvalidGrant', inputs: [] },
{ type: 'error', name: 'InvalidGrantee', inputs: [] },
{ type: 'error', name: 'InvalidSettleParams', inputs: [] },
{ type: 'error', name: 'InvalidSettler', inputs: [] },
{ type: 'error', name: 'InvalidSignature', inputs: [] },
{ type: 'error', name: 'InvalidStatus', inputs: [] },
{ type: 'error', name: 'NotAllowedByGate', inputs: [] },
{ type: 'error', name: 'PendingSettlement', 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: 'UnsupportedToken', inputs: [] },
];