@sfpro/sdk
Version:
TypeScript SDK for Superfluid Protocol - stream money every second
1,499 lines • 211 kB
JavaScript
import { createReadContract, createWriteContract, createSimulateContract, createWatchContractEvent, } from '@wagmi/core/codegen';
export const batchLiquidatorAbi = [
{
type: 'constructor',
inputs: [{ name: 'host_', internalType: 'address', type: 'address' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'cfa',
outputs: [{ name: '', internalType: 'address', type: 'address' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: 'superToken', internalType: 'address', type: 'address' },
{
name: 'data',
internalType: 'struct BatchLiquidator.FlowLiquidationData',
type: 'tuple',
components: [
{
name: 'agreementOperation',
internalType: 'enum BatchLiquidator.FlowType',
type: 'uint8',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
],
},
],
name: 'deleteFlow',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{ name: 'superToken', internalType: 'address', type: 'address' },
{
name: 'data',
internalType: 'struct BatchLiquidator.FlowLiquidationData[]',
type: 'tuple[]',
components: [
{
name: 'agreementOperation',
internalType: 'enum BatchLiquidator.FlowType',
type: 'uint8',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
],
},
],
name: 'deleteFlows',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'gda',
outputs: [{ name: '', internalType: 'address', type: 'address' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'host',
outputs: [{ name: '', internalType: 'address', type: 'address' }],
stateMutability: 'view',
},
];
export const batchLiquidatorAddress = {
1: '0xcb05535bd212eCFC4B7b9db81d6C2C768b726776',
10: '0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb',
56: '0xF353978890204756fc5fa6dfbD16a91eac9E6f4d',
100: '0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013',
137: '0x444A48dA32649Ed03eeC9B9cD416748262c320E6',
8453: '0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534',
42161: '0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb',
42220: '0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3',
43113: '0x36446Ec9C7909608065dEB7f491701d815B880e5',
43114: '0x42B709822F18595443c308c1BE5E63CbFEf06481',
84532: '0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f',
534351: '0xe25603df330027d91A0BAcc3e80a7f9e84930FC6',
534352: '0x7613030429E95cDFC76FE70f9573037068B51815',
11155111: '0x862F59081FC7907F940bE4227b9f485d700E6cdD',
11155420: '0x109412E3C84f0539b43d39dB691B08c90f58dC7c',
666666666: '0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C',
};
export const batchLiquidatorConfig = {
address: batchLiquidatorAddress,
abi: batchLiquidatorAbi,
};
export const cfaAbi = [
{
type: 'constructor',
inputs: [
{ name: 'host', internalType: 'contract ISuperfluid', type: 'address' },
],
stateMutability: 'nonpayable',
},
{ type: 'error', inputs: [], name: 'AGREEMENT_BASE_ONLY_HOST' },
{
type: 'error',
inputs: [{ name: '_code', internalType: 'uint256', type: 'uint256' }],
name: 'APP_RULE',
},
{ type: 'error', inputs: [], name: 'CFA_ACL_FLOW_RATE_ALLOWANCE_EXCEEDED' },
{ type: 'error', inputs: [], name: 'CFA_ACL_NO_NEGATIVE_ALLOWANCE' },
{ type: 'error', inputs: [], name: 'CFA_ACL_NO_SENDER_CREATE' },
{ type: 'error', inputs: [], name: 'CFA_ACL_NO_SENDER_FLOW_OPERATOR' },
{ type: 'error', inputs: [], name: 'CFA_ACL_NO_SENDER_UPDATE' },
{ type: 'error', inputs: [], name: 'CFA_ACL_OPERATOR_NO_CREATE_PERMISSIONS' },
{ type: 'error', inputs: [], name: 'CFA_ACL_OPERATOR_NO_DELETE_PERMISSIONS' },
{ type: 'error', inputs: [], name: 'CFA_ACL_OPERATOR_NO_UPDATE_PERMISSIONS' },
{ type: 'error', inputs: [], name: 'CFA_ACL_UNCLEAN_PERMISSIONS' },
{ type: 'error', inputs: [], name: 'CFA_DEPOSIT_TOO_BIG' },
{ type: 'error', inputs: [], name: 'CFA_FLOW_ALREADY_EXISTS' },
{ type: 'error', inputs: [], name: 'CFA_FLOW_DOES_NOT_EXIST' },
{ type: 'error', inputs: [], name: 'CFA_FLOW_RATE_TOO_BIG' },
{ type: 'error', inputs: [], name: 'CFA_HOOK_OUT_OF_GAS' },
{ type: 'error', inputs: [], name: 'CFA_INSUFFICIENT_BALANCE' },
{ type: 'error', inputs: [], name: 'CFA_INVALID_FLOW_RATE' },
{ type: 'error', inputs: [], name: 'CFA_NON_CRITICAL_SENDER' },
{ type: 'error', inputs: [], name: 'CFA_NO_SELF_FLOW' },
{ type: 'error', inputs: [], name: 'CFA_ZERO_ADDRESS_RECEIVER' },
{ type: 'error', inputs: [], name: 'CFA_ZERO_ADDRESS_SENDER' },
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'uuid',
internalType: 'bytes32',
type: 'bytes32',
indexed: false,
},
{
name: 'codeAddress',
internalType: 'address',
type: 'address',
indexed: false,
},
],
name: 'CodeUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'sender',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'flowOperator',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'permissions',
internalType: 'uint8',
type: 'uint8',
indexed: false,
},
{
name: 'flowRateAllowance',
internalType: 'int96',
type: 'int96',
indexed: false,
},
],
name: 'FlowOperatorUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'sender',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'receiver',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'flowRate',
internalType: 'int96',
type: 'int96',
indexed: false,
},
{
name: 'totalSenderFlowRate',
internalType: 'int256',
type: 'int256',
indexed: false,
},
{
name: 'totalReceiverFlowRate',
internalType: 'int256',
type: 'int256',
indexed: false,
},
{
name: 'userData',
internalType: 'bytes',
type: 'bytes',
indexed: false,
},
],
name: 'FlowUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'flowOperator',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'deposit',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
],
name: 'FlowUpdatedExtension',
},
{
type: 'event',
anonymous: false,
inputs: [
{ name: 'version', internalType: 'uint8', type: 'uint8', indexed: false },
],
name: 'Initialized',
},
{
type: 'function',
inputs: [],
name: 'CFA_HOOK_GAS_LIMIT',
outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'DEFAULT_MINIMUM_DEPOSIT',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'MAXIMUM_DEPOSIT',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'MAXIMUM_FLOW_RATE',
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: 'existingPermissions', internalType: 'uint8', type: 'uint8' },
{ name: 'permissionDelta', internalType: 'uint8', type: 'uint8' },
],
name: 'addPermissions',
outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
stateMutability: 'pure',
},
{
type: 'function',
inputs: [],
name: 'agreementType',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'pure',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'authorizeFlowOperatorWithFullControl',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'castrate',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'createFlow',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'createFlowByOperator',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{
name: 'subtractedFlowRateAllowance',
internalType: 'int96',
type: 'int96',
},
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'decreaseFlowRateAllowance',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'permissionsToRemove', internalType: 'uint8', type: 'uint8' },
{
name: 'subtractedFlowRateAllowance',
internalType: 'int96',
type: 'int96',
},
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'decreaseFlowRateAllowanceWithPermissions',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'deleteFlow',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'deleteFlowByOperator',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'getAccountFlowInfo',
outputs: [
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
{ name: 'owedDeposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'getCodeAddress',
outputs: [
{ name: 'codeAddress', internalType: 'address', type: 'address' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
],
name: 'getDepositRequiredForFlowRate',
outputs: [{ name: 'deposit', internalType: 'uint256', type: 'uint256' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
],
name: 'getFlow',
outputs: [
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
{ name: 'owedDeposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowId', internalType: 'bytes32', type: 'bytes32' },
],
name: 'getFlowByID',
outputs: [
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
{ name: 'owedDeposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'flowOperator', internalType: 'address', type: 'address' },
],
name: 'getFlowOperatorData',
outputs: [
{ name: 'flowOperatorId', internalType: 'bytes32', type: 'bytes32' },
{ name: 'permissions', internalType: 'uint8', type: 'uint8' },
{ name: 'flowRateAllowance', internalType: 'int96', type: 'int96' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperatorId', internalType: 'bytes32', type: 'bytes32' },
],
name: 'getFlowOperatorDataByID',
outputs: [
{ name: 'permissions', internalType: 'uint8', type: 'uint8' },
{ name: 'flowRateAllowance', internalType: 'int96', type: 'int96' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
],
name: 'getMaximumFlowRateFromDeposit',
outputs: [{ name: 'flowRate', internalType: 'int96', type: 'int96' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'getNetFlow',
outputs: [{ name: 'flowRate', internalType: 'int96', type: 'int96' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'addedFlowRateAllowance', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'increaseFlowRateAllowance',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'permissionsToAdd', internalType: 'uint8', type: 'uint8' },
{ name: 'addedFlowRateAllowance', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'increaseFlowRateAllowanceWithPermissions',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
],
name: 'isPatricianPeriod',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'isPatricianPeriodNow',
outputs: [
{
name: 'isCurrentlyPatricianPeriod',
internalType: 'bool',
type: 'bool',
},
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'proxiableUUID',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
{ name: 'time', internalType: 'uint256', type: 'uint256' },
],
name: 'realtimeBalanceOf',
outputs: [
{ name: 'dynamicBalance', internalType: 'int256', type: 'int256' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
{ name: 'owedDeposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: 'existingPermissions', internalType: 'uint8', type: 'uint8' },
{ name: 'permissionDelta', internalType: 'uint8', type: 'uint8' },
],
name: 'removePermissions',
outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
stateMutability: 'pure',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'revokeFlowOperatorWithFullControl',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [{ name: 'newAddress', internalType: 'address', type: 'address' }],
name: 'updateCode',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'updateFlow',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'sender', internalType: 'address', type: 'address' },
{ name: 'receiver', internalType: 'address', type: 'address' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'updateFlowByOperator',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'flowOperator', internalType: 'address', type: 'address' },
{ name: 'permissions', internalType: 'uint8', type: 'uint8' },
{ name: 'flowRateAllowance', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'updateFlowOperatorPermissions',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
];
export const cfaAddress = {
1: '0x2844c1BBdA121E9E43105630b9C8310e5c72744b',
10: '0x204C6f131bb7F258b2Ea1593f5309911d8E458eD',
56: '0x49c38108870e74Cb9420C0991a85D3edd6363F75',
100: '0xEbdA4ceF883A7B12c4E669Ebc58927FBa8447C7D',
137: '0x6EeE6060f715257b970700bc2656De21dEdF074C',
8453: '0x19ba78B9cDB05A877718841c574325fdB53601bb',
42161: '0x731FdBB12944973B500518aea61942381d7e240D',
42220: '0x9d369e78e1a682cE0F8d9aD849BeA4FE1c3bD3Ad',
43113: '0x16843ac25Ccc58Aa7960ba05f61cBB17b36b130A',
43114: '0x6946c5B38Ffea373b0a2340b4AEf0De8F6782e58',
84532: '0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef',
534351: '0xbc46B4Aa41c055578306820013d4B65fff42711E',
534352: '0xB3bcD6da1eeB6c97258B3806A853A6dcD3B6C00c',
11155111: '0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef',
11155420: '0x8a3170AdbC67233196371226141736E4151e7C26',
666666666: '0x82cc052d1b17aC554a22A88D5876B56c6b51e95c',
};
export const cfaConfig = { address: cfaAddress, abi: cfaAbi };
export const gdaAbi = [
{
type: 'constructor',
inputs: [
{ name: 'host', internalType: 'contract ISuperfluid', type: 'address' },
{
name: 'superfluidPoolBeacon_',
internalType: 'contract SuperfluidUpgradeableBeacon',
type: 'address',
},
],
stateMutability: 'nonpayable',
},
{ type: 'error', inputs: [], name: 'AGREEMENT_BASE_ONLY_HOST' },
{ type: 'error', inputs: [], name: 'GDA_ADMIN_CANNOT_BE_POOL' },
{ type: 'error', inputs: [], name: 'GDA_DISTRIBUTE_FOR_OTHERS_NOT_ALLOWED' },
{
type: 'error',
inputs: [],
name: 'GDA_DISTRIBUTE_FROM_ANY_ADDRESS_NOT_ALLOWED',
},
{ type: 'error', inputs: [], name: 'GDA_FLOW_DOES_NOT_EXIST' },
{ type: 'error', inputs: [], name: 'GDA_INSUFFICIENT_BALANCE' },
{ type: 'error', inputs: [], name: 'GDA_NON_CRITICAL_SENDER' },
{ type: 'error', inputs: [], name: 'GDA_NOT_POOL_ADMIN' },
{ type: 'error', inputs: [], name: 'GDA_NO_NEGATIVE_FLOW_RATE' },
{ type: 'error', inputs: [], name: 'GDA_NO_ZERO_ADDRESS_ADMIN' },
{ type: 'error', inputs: [], name: 'GDA_ONLY_SUPER_TOKEN_POOL' },
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
indexed: true,
},
{ name: 'from', internalType: 'address', type: 'address', indexed: true },
{
name: 'bufferDelta',
internalType: 'int256',
type: 'int256',
indexed: false,
},
{
name: 'newBufferAmount',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
{
name: 'totalBufferAmount',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
],
name: 'BufferAdjusted',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'uuid',
internalType: 'bytes32',
type: 'bytes32',
indexed: false,
},
{
name: 'codeAddress',
internalType: 'address',
type: 'address',
indexed: false,
},
],
name: 'CodeUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
indexed: true,
},
{
name: 'distributor',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'operator',
internalType: 'address',
type: 'address',
indexed: false,
},
{
name: 'oldFlowRate',
internalType: 'int96',
type: 'int96',
indexed: false,
},
{
name: 'newDistributorToPoolFlowRate',
internalType: 'int96',
type: 'int96',
indexed: false,
},
{
name: 'newTotalDistributionFlowRate',
internalType: 'int96',
type: 'int96',
indexed: false,
},
{
name: 'adjustmentFlowRecipient',
internalType: 'address',
type: 'address',
indexed: false,
},
{
name: 'adjustmentFlowRate',
internalType: 'int96',
type: 'int96',
indexed: false,
},
{
name: 'userData',
internalType: 'bytes',
type: 'bytes',
indexed: false,
},
],
name: 'FlowDistributionUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{ name: 'version', internalType: 'uint8', type: 'uint8', indexed: false },
],
name: 'Initialized',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
indexed: true,
},
{
name: 'distributor',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'operator',
internalType: 'address',
type: 'address',
indexed: false,
},
{
name: 'requestedAmount',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
{
name: 'actualAmount',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
{
name: 'userData',
internalType: 'bytes',
type: 'bytes',
indexed: false,
},
],
name: 'InstantDistributionUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
indexed: true,
},
{
name: 'account',
internalType: 'address',
type: 'address',
indexed: true,
},
{ name: 'connected', internalType: 'bool', type: 'bool', indexed: false },
{
name: 'userData',
internalType: 'bytes',
type: 'bytes',
indexed: false,
},
],
name: 'PoolConnectionUpdated',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
indexed: true,
},
{
name: 'admin',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
indexed: false,
},
],
name: 'PoolCreated',
},
{
type: 'function',
inputs: [],
name: 'SLOTS_BITMAP_LIBRARY_ADDRESS',
outputs: [{ name: '', internalType: 'address', type: 'address' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'SUPERFLUID_POOL_DEPLOYER_ADDRESS',
outputs: [{ name: '', internalType: 'address', type: 'address' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'agreementType',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'pure',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{
name: 'p',
internalType: 'struct BasicParticle',
type: 'tuple',
components: [
{ name: '_settled_at', internalType: 'Time', type: 'uint32' },
{ name: '_flow_rate', internalType: 'FlowRate', type: 'int128' },
{ name: '_settled_value', internalType: 'Value', type: 'int256' },
],
},
{ name: 't', internalType: 'Time', type: 'uint32' },
],
name: 'appendIndexUpdateByPool',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'castrate',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'memberAddress', internalType: 'address', type: 'address' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'claimAll',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'doConnect', internalType: 'bool', type: 'bool' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'connectPool',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'connectPool',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'admin', internalType: 'address', type: 'address' },
{
name: 'config',
internalType: 'struct PoolConfig',
type: 'tuple',
components: [
{
name: 'transferabilityForUnitsOwner',
internalType: 'bool',
type: 'bool',
},
{
name: 'distributionFromAnyAddress',
internalType: 'bool',
type: 'bool',
},
],
},
],
name: 'createPool',
outputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'disconnectPool',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'requestedAmount', internalType: 'uint256', type: 'uint256' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'distribute',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'requestedFlowRate', internalType: 'int96', type: 'int96' },
{ name: 'ctx', internalType: 'bytes', type: 'bytes' },
],
name: 'distributeFlow',
outputs: [{ name: 'newCtx', internalType: 'bytes', type: 'bytes' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{ name: 'to', internalType: 'contract ISuperfluidPool', type: 'address' },
{ name: 'requestedAmount', internalType: 'uint256', type: 'uint256' },
],
name: 'estimateDistributionActualAmount',
outputs: [
{ name: 'actualAmount', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{ name: 'to', internalType: 'contract ISuperfluidPool', type: 'address' },
{ name: 'requestedFlowRate', internalType: 'int96', type: 'int96' },
],
name: 'estimateFlowDistributionActualFlowRate',
outputs: [
{ name: 'actualFlowRate', internalType: 'int96', type: 'int96' },
{
name: 'totalDistributionFlowRate',
internalType: 'int96',
type: 'int96',
},
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'getAccountFlowInfo',
outputs: [
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'getCodeAddress',
outputs: [
{ name: 'codeAddress', internalType: 'address', type: 'address' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{ name: 'to', internalType: 'contract ISuperfluidPool', type: 'address' },
],
name: 'getFlow',
outputs: [
{ name: 'lastUpdated', internalType: 'uint256', type: 'uint256' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
{ name: 'deposit', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'from', internalType: 'address', type: 'address' },
{ name: 'to', internalType: 'contract ISuperfluidPool', type: 'address' },
],
name: 'getFlowRate',
outputs: [{ name: '', internalType: 'int96', type: 'int96' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'getNetFlow',
outputs: [{ name: 'netFlowRate', internalType: 'int96', type: 'int96' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
],
name: 'getPoolAdjustmentFlowInfo',
outputs: [
{ name: 'recipient', internalType: 'address', type: 'address' },
{ name: 'flowHash', internalType: 'bytes32', type: 'bytes32' },
{ name: 'flowRate', internalType: 'int96', type: 'int96' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [{ name: 'pool', internalType: 'address', type: 'address' }],
name: 'getPoolAdjustmentFlowRate',
outputs: [{ name: '', internalType: 'int96', type: 'int96' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'pool',
internalType: 'contract ISuperfluidPool',
type: 'address',
},
{ name: 'member', internalType: 'address', type: 'address' },
],
name: 'isMemberConnected',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
],
name: 'isPatricianPeriod',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'isPatricianPeriodNow',
outputs: [
{
name: 'isCurrentlyPatricianPeriod',
internalType: 'bool',
type: 'bool',
},
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'isPool',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'superToken',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'claimRecipient', internalType: 'address', type: 'address' },
{ name: 'amount', internalType: 'int256', type: 'int256' },
],
name: 'poolSettleClaim',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'proxiableUUID',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
{ name: 'time', internalType: 'uint256', type: 'uint256' },
],
name: 'realtimeBalanceOf',
outputs: [
{ name: 'rtb', internalType: 'int256', type: 'int256' },
{ name: 'buf', internalType: 'uint256', type: 'uint256' },
{ name: 'owedBuffer', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{
name: 'token',
internalType: 'contract ISuperfluidToken',
type: 'address',
},
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'realtimeBalanceOfNow',
outputs: [
{ name: 'availableBalance', internalType: 'int256', type: 'int256' },
{ name: 'buffer', internalType: 'uint256', type: 'uint256' },
{ name: 'owedBuffer', internalType: 'uint256', type: 'uint256' },
{ name: 'timestamp', internalType: 'uint256', type: 'uint256' },
],
stateMutability: 'view',
},
{
type: 'f