From 01eca5a7172106a8da88106f7d72893d5afdbea7 Mon Sep 17 00:00:00 2001 From: Mubaris NK Date: Thu, 25 Feb 2021 18:29:15 +0530 Subject: [PATCH] Update ABI --- src/abi/connectors/gelato.ts | 1209 ++++++++++++++++++------------- src/abi/connectors/refinance.ts | 156 ++-- src/abi/connectors/uniswap.ts | 326 ++++++--- 3 files changed, 986 insertions(+), 705 deletions(-) diff --git a/src/abi/connectors/gelato.ts b/src/abi/connectors/gelato.ts index 5db5fe75..f350c062 100644 --- a/src/abi/connectors/gelato.ts +++ b/src/abi/connectors/gelato.ts @@ -1,194 +1,231 @@ import { AbiItem } from 'web3-utils' export const gelato: AbiItem[] = [ + { + inputs: [{ internalType: "uint256", name: "_id", type: "uint256" }], + stateMutability: "nonpayable", + type: "constructor", + }, { anonymous: false, inputs: [ { components: [ - { internalType: 'uint256', name: 'id', type: 'uint256' }, - { internalType: 'address', name: 'userProxy', type: 'address' }, + { internalType: "uint256", name: "id", type: "uint256" }, + { + internalType: "address", + name: "userProxy", + type: "address", + }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "address", + name: "module", + type: "address", + }, ], - internalType: 'struct Provider', - name: 'provider', - type: 'tuple', + internalType: "struct Provider", + name: "provider", + type: "tuple", }, - { internalType: 'uint256', name: 'index', type: 'uint256' }, + { internalType: "uint256", name: "index", type: "uint256" }, { components: [ { components: [ { - internalType: 'address', - name: 'inst', - type: 'address', + internalType: "address", + name: "inst", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ { - internalType: 'address', - name: 'addr', - type: 'address', + internalType: "address", + name: "addr", + type: "address", }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "bytes", + name: "data", + type: "bytes", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum Operation", + name: "operation", + type: "uint8", }, { - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", }, { - internalType: 'bool', - name: 'termsOkCheck', - type: 'bool', + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], - internalType: 'struct Task[]', - name: 'tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "tasks", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'expiryDate', - type: 'uint256', + internalType: "uint256", + name: "expiryDate", + type: "uint256", }, - { internalType: 'uint256', name: 'cycleId', type: 'uint256' }, + { internalType: "uint256", name: "cycleId", type: "uint256" }, { - internalType: 'uint256', - name: 'submissionsLeft', - type: 'uint256', + internalType: "uint256", + name: "submissionsLeft", + type: "uint256", }, ], indexed: true, - internalType: 'struct TaskReceipt[]', - name: 'taskReceipt', - type: 'tuple[]', + internalType: "struct TaskReceipt[]", + name: "taskReceipt", + type: "tuple[]", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogMultiCancelTasks', - type: 'event', + name: "LogMultiCancelTasks", + type: "event", }, { anonymous: false, inputs: [ { indexed: true, - internalType: 'address', - name: 'executor', - type: 'address', + internalType: "address", + name: "executor", + type: "address", }, { components: [ { - internalType: 'address[]', - name: 'conditions', - type: 'address[]', + internalType: "address[]", + name: "conditions", + type: "address[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'gasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "gasPriceCeil", + type: "uint256", }, ], indexed: true, - internalType: 'struct TaskSpec[]', - name: 'taskspecs', - type: 'tuple[]', + internalType: "struct TaskSpec[]", + name: "taskspecs", + type: "tuple[]", }, { indexed: true, - internalType: 'address[]', - name: 'modules', - type: 'address[]', + internalType: "address[]", + name: "modules", + type: "address[]", }, { indexed: false, - internalType: 'uint256', - name: 'ethToDeposit', - type: 'uint256', + internalType: "uint256", + name: "ethToDeposit", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogMultiProvide', - type: 'event', + name: "LogMultiProvide", + type: "event", }, { anonymous: false, @@ -196,741 +233,905 @@ export const gelato: AbiItem[] = [ { components: [ { - internalType: 'address[]', - name: 'conditions', - type: 'address[]', + internalType: "address[]", + name: "conditions", + type: "address[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'gasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "gasPriceCeil", + type: "uint256", }, ], indexed: true, - internalType: 'struct TaskSpec[]', - name: 'taskspecs', - type: 'tuple[]', + internalType: "struct TaskSpec[]", + name: "taskspecs", + type: "tuple[]", }, { indexed: true, - internalType: 'address[]', - name: 'modules', - type: 'address[]', + internalType: "address[]", + name: "modules", + type: "address[]", }, { indexed: false, - internalType: 'uint256', - name: 'ethToWithdraw', - type: 'uint256', + internalType: "uint256", + name: "ethToWithdraw", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogMultiUnprovide', - type: 'event', + name: "LogMultiUnprovide", + type: "event", }, { anonymous: false, inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], indexed: true, - internalType: 'struct Provider', - name: 'provider', - type: 'tuple', + internalType: "struct Provider", + name: "provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", }, + { internalType: "bytes", name: "data", type: "bytes" }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], indexed: true, - internalType: 'struct Task', - name: 'task', - type: 'tuple', + internalType: "struct Task", + name: "task", + type: "tuple", }, { indexed: true, - internalType: 'uint256', - name: 'expiryDate', - type: 'uint256', + internalType: "uint256", + name: "expiryDate", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogSubmitTask', - type: 'event', + name: "LogSubmitTask", + type: "event", }, { anonymous: false, inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], indexed: true, - internalType: 'struct Provider', - name: 'provider', - type: 'tuple', + internalType: "struct Provider", + name: "provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], indexed: true, - internalType: 'struct Task[]', - name: 'tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "tasks", + type: "tuple[]", }, { indexed: true, - internalType: 'uint256', - name: 'expiryDate', - type: 'uint256', + internalType: "uint256", + name: "expiryDate", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogSubmitTaskChain', - type: 'event', + name: "LogSubmitTaskChain", + type: "event", }, { anonymous: false, inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], indexed: true, - internalType: 'struct Provider', - name: 'provider', - type: 'tuple', + internalType: "struct Provider", + name: "provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], indexed: true, - internalType: 'struct Task[]', - name: 'tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "tasks", + type: "tuple[]", }, { indexed: true, - internalType: 'uint256', - name: 'expiryDate', - type: 'uint256', + internalType: "uint256", + name: "expiryDate", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'getId', - type: 'uint256', + internalType: "uint256", + name: "getId", + type: "uint256", }, { indexed: false, - internalType: 'uint256', - name: 'setId', - type: 'uint256', + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'LogSubmitTaskCycle', - type: 'event', + name: "LogSubmitTaskCycle", + type: "event", }, { inputs: [], - name: 'connectorID', + name: "connectorID", outputs: [ - { internalType: 'uint256', name: '_type', type: 'uint256' }, - { internalType: 'uint256', name: '_id', type: 'uint256' }, + { internalType: "uint256", name: "_type", type: "uint256" }, + { internalType: "uint256", name: "id", type: "uint256" }, ], - stateMutability: 'pure', - type: 'function', + stateMutability: "view", + type: "function", }, { inputs: [ { components: [ - { internalType: 'uint256', name: 'id', type: 'uint256' }, - { internalType: 'address', name: 'userProxy', type: 'address' }, + { internalType: "uint256", name: "id", type: "uint256" }, + { + internalType: "address", + name: "userProxy", + type: "address", + }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "address", + name: "module", + type: "address", + }, ], - internalType: 'struct Provider', - name: 'provider', - type: 'tuple', + internalType: "struct Provider", + name: "provider", + type: "tuple", }, - { internalType: 'uint256', name: 'index', type: 'uint256' }, + { internalType: "uint256", name: "index", type: "uint256" }, { components: [ { components: [ { - internalType: 'address', - name: 'inst', - type: 'address', + internalType: "address", + name: "inst", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ { - internalType: 'address', - name: 'addr', - type: 'address', + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "enum Operation", + name: "operation", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", }, { - internalType: 'uint256', - name: 'value', - type: 'uint256', + internalType: "uint256", + name: "value", + type: "uint256", }, { - internalType: 'bool', - name: 'termsOkCheck', - type: 'bool', + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], - internalType: 'struct Task[]', - name: 'tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "tasks", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'expiryDate', - type: 'uint256', + internalType: "uint256", + name: "expiryDate", + type: "uint256", }, - { internalType: 'uint256', name: 'cycleId', type: 'uint256' }, + { internalType: "uint256", name: "cycleId", type: "uint256" }, { - internalType: 'uint256', - name: 'submissionsLeft', - type: 'uint256', + internalType: "uint256", + name: "submissionsLeft", + type: "uint256", }, ], - internalType: 'struct TaskReceipt[]', - name: '_taskReceipts', - type: 'tuple[]', + internalType: "struct TaskReceipt[]", + name: "_taskReceipts", + type: "tuple[]", }, ], - name: 'multiCancelTasks', + name: "multiCancelTasks", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ - { internalType: 'address', name: '_executor', type: 'address' }, + { internalType: "address", name: "_executor", type: "address" }, { components: [ { - internalType: 'address[]', - name: 'conditions', - type: 'address[]', + internalType: "address[]", + name: "conditions", + type: "address[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'gasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "gasPriceCeil", + type: "uint256", }, ], - internalType: 'struct TaskSpec[]', - name: '_taskSpecs', - type: 'tuple[]', - }, - { internalType: 'address[]', name: '_modules', type: 'address[]' }, - { internalType: 'uint256', name: '_ethToDeposit', type: 'uint256' }, - { internalType: 'uint256', name: '_getId', type: 'uint256' }, - { internalType: 'uint256', name: '_setId', type: 'uint256' }, + internalType: "struct TaskSpec[]", + name: "_taskSpecs", + type: "tuple[]", + }, + { + internalType: "address[]", + name: "_modules", + type: "address[]", + }, + { + internalType: "uint256", + name: "_ethToDeposit", + type: "uint256", + }, + { internalType: "uint256", name: "_getId", type: "uint256" }, + { internalType: "uint256", name: "_setId", type: "uint256" }, ], - name: 'multiProvide', + name: "multiProvide", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ { - internalType: 'uint256', - name: '_withdrawAmount', - type: 'uint256', + internalType: "uint256", + name: "_withdrawAmount", + type: "uint256", }, { components: [ { - internalType: 'address[]', - name: 'conditions', - type: 'address[]', + internalType: "address[]", + name: "conditions", + type: "address[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'gasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "gasPriceCeil", + type: "uint256", }, ], - internalType: 'struct TaskSpec[]', - name: '_taskSpecs', - type: 'tuple[]', + internalType: "struct TaskSpec[]", + name: "_taskSpecs", + type: "tuple[]", + }, + { + internalType: "address[]", + name: "_modules", + type: "address[]", }, - { internalType: 'address[]', name: '_modules', type: 'address[]' }, - { internalType: 'uint256', name: '_getId', type: 'uint256' }, - { internalType: 'uint256', name: '_setId', type: 'uint256' }, + { internalType: "uint256", name: "_getId", type: "uint256" }, + { internalType: "uint256", name: "_setId", type: "uint256" }, ], - name: 'multiUnprovide', + name: "multiUnprovide", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [], - name: 'name', - outputs: [{ internalType: 'string', name: '', type: 'string' }], - stateMutability: 'view', - type: 'function', + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", }, { inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], - internalType: 'struct Provider', - name: '_provider', - type: 'tuple', + internalType: "struct Provider", + name: "_provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], - internalType: 'struct Task', - name: '_task', - type: 'tuple', + internalType: "struct Task", + name: "_task", + type: "tuple", }, - { internalType: 'uint256', name: '_expiryDate', type: 'uint256' }, + { internalType: "uint256", name: "_expiryDate", type: "uint256" }, ], - name: 'submitTask', + name: "submitTask", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], - internalType: 'struct Provider', - name: '_provider', - type: 'tuple', + internalType: "struct Provider", + name: "_provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], - internalType: 'struct Task[]', - name: '_tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "_tasks", + type: "tuple[]", }, - { internalType: 'uint256', name: '_expiryDate', type: 'uint256' }, + { internalType: "uint256", name: "_expiryDate", type: "uint256" }, { - internalType: 'uint256', - name: '_sumOfRequestedTaskSubmits', - type: 'uint256', + internalType: "uint256", + name: "_sumOfRequestedTaskSubmits", + type: "uint256", }, ], - name: 'submitTaskChain', + name: "submitTaskChain", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, { inputs: [ { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'address', name: 'module', type: 'address' }, + { internalType: "address", name: "addr", type: "address" }, + { internalType: "address", name: "module", type: "address" }, ], - internalType: 'struct Provider', - name: '_provider', - type: 'tuple', + internalType: "struct Provider", + name: "_provider", + type: "tuple", }, { components: [ { components: [ - { internalType: 'address', name: 'inst', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, + { + internalType: "address", + name: "inst", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, ], - internalType: 'struct Condition[]', - name: 'conditions', - type: 'tuple[]', + internalType: "struct Condition[]", + name: "conditions", + type: "tuple[]", }, { components: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, { - internalType: 'enum Operation', - name: 'operation', - type: 'uint8', + internalType: "address", + name: "addr", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + { + internalType: "enum Operation", + name: "operation", + type: "uint8", + }, + { + internalType: "enum DataFlow", + name: "dataFlow", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", }, { - internalType: 'enum DataFlow', - name: 'dataFlow', - type: 'uint8', + internalType: "bool", + name: "termsOkCheck", + type: "bool", }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bool', name: 'termsOkCheck', type: 'bool' }, ], - internalType: 'struct Action[]', - name: 'actions', - type: 'tuple[]', + internalType: "struct Action[]", + name: "actions", + type: "tuple[]", }, { - internalType: 'uint256', - name: 'selfProviderGasLimit', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasLimit", + type: "uint256", }, { - internalType: 'uint256', - name: 'selfProviderGasPriceCeil', - type: 'uint256', + internalType: "uint256", + name: "selfProviderGasPriceCeil", + type: "uint256", }, ], - internalType: 'struct Task[]', - name: '_tasks', - type: 'tuple[]', + internalType: "struct Task[]", + name: "_tasks", + type: "tuple[]", }, - { internalType: 'uint256', name: '_expiryDate', type: 'uint256' }, - { internalType: 'uint256', name: '_cycles', type: 'uint256' }, + { internalType: "uint256", name: "_expiryDate", type: "uint256" }, + { internalType: "uint256", name: "_cycles", type: "uint256" }, ], - name: 'submitTaskCycle', + name: "submitTaskCycle", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", }, ] diff --git a/src/abi/connectors/refinance.ts b/src/abi/connectors/refinance.ts index 0f41387f..fafe96e8 100644 --- a/src/abi/connectors/refinance.ts +++ b/src/abi/connectors/refinance.ts @@ -3,131 +3,93 @@ import { AbiItem } from 'web3-utils'; export const refinance: AbiItem[] = [ { inputs: [], - name: 'connectorID', + name: "connectorID", outputs: [ - { internalType: 'uint256', name: '_type', type: 'uint256' }, - { internalType: 'uint256', name: '_id', type: 'uint256' }, + { + internalType: "uint256", + name: "_type", + type: "uint256" + }, + { + internalType: "uint256", + name: "_id", + type: "uint256" + } ], - stateMutability: 'pure', - type: 'function', + stateMutability: "pure", + type: "function" }, { inputs: [], - name: 'name', - outputs: [{ internalType: 'string', name: '', type: 'string' }], - stateMutability: 'view', - type: 'function', + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" }, { inputs: [ { components: [ { - internalType: 'enum Helpers.Protocol', - name: 'source', - type: 'uint8', - }, - { - internalType: 'enum Helpers.Protocol', - name: 'target', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'collateralFee', - type: 'uint256', - }, - { internalType: 'uint256', name: 'debtFee', type: 'uint256' }, - { - internalType: 'address[]', - name: 'tokens', - type: 'address[]', - }, - { - internalType: 'uint256[]', - name: 'borrowAmts', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'withdrawAmts', - type: 'uint256[]', + internalType: "enum Helpers.Protocol", + name: "source", + type: "uint8" }, { - internalType: 'uint256[]', - name: 'borrowRateModes', - type: 'uint256[]', + internalType: "enum Helpers.Protocol", + name: "target", + type: "uint8" }, { - internalType: 'uint256[]', - name: 'paybackRateModes', - type: 'uint256[]', + internalType: "uint256", + name: "collateralFee", + type: "uint256" }, - ], - internalType: 'struct RefinanceResolver.RefinanceData', - name: 'data', - type: 'tuple', - }, - ], - name: 'refinance', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'fromVaultId', - type: 'uint256', - }, - { internalType: 'uint256', name: 'toVaultId', type: 'uint256' }, { - internalType: 'enum Helpers.Protocol', - name: 'source', - type: 'uint8', + internalType: "uint256", + name: "debtFee", + type: "uint256" }, { - internalType: 'enum Helpers.Protocol', - name: 'target', - type: 'uint8', + internalType: "address[]", + name: "tokens", + type: "address[]" }, { - internalType: 'uint256', - name: 'collateralFee', - type: 'uint256', + internalType: "uint256[]", + name: "borrowAmts", + type: "uint256[]" }, - { internalType: 'uint256', name: 'debtFee', type: 'uint256' }, - { internalType: 'bool', name: 'isFrom', type: 'bool' }, - { internalType: 'string', name: 'colType', type: 'string' }, - { internalType: 'address', name: 'token', type: 'address' }, - { internalType: 'uint256', name: 'debt', type: 'uint256' }, { - internalType: 'uint256', - name: 'collateral', - type: 'uint256', + internalType: "uint256[]", + name: "withdrawAmts", + type: "uint256[]" }, { - internalType: 'uint256', - name: 'borrowRateMode', - type: 'uint256', + internalType: "uint256[]", + name: "borrowRateModes", + type: "uint256[]" }, { - internalType: 'uint256', - name: 'paybackRateMode', - type: 'uint256', - }, + internalType: "uint256[]", + name: "paybackRateModes", + type: "uint256[]" + } ], - internalType: 'struct RefinanceResolver.RefinanceMakerData', - name: 'data', - type: 'tuple', - }, + internalType: "struct RefinanceResolver.RefinanceData", + name: "data", + type: "tuple" + } ], - name: 'refinanceMaker', + name: "refinance", outputs: [], - stateMutability: 'payable', - type: 'function', - }, + stateMutability: "payable", + type: "function" + } ]; diff --git a/src/abi/connectors/uniswap.ts b/src/abi/connectors/uniswap.ts index 6061210a..baa0b080 100644 --- a/src/abi/connectors/uniswap.ts +++ b/src/abi/connectors/uniswap.ts @@ -2,178 +2,296 @@ import { AbiItem } from 'web3-utils' export const uniswap: AbiItem[] = [ { + anonymous: false, inputs: [ { - internalType: 'address', - name: 'buyAddr', - type: 'address', + indexed: true, + internalType: "address", + name: "buyToken", + type: "address", }, { - internalType: 'address', - name: 'sellAddr', - type: 'address', + indexed: true, + internalType: "address", + name: "sellToken", + type: "address", }, { - internalType: 'uint256', - name: 'buyAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "buyAmt", + type: "uint256", }, { - internalType: 'uint256', - name: 'unitAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "sellAmt", + type: "uint256", }, { - internalType: 'uint256', - name: 'getId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "getId", + type: "uint256", }, { - internalType: 'uint256', - name: 'setId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'buy', - outputs: [], - stateMutability: 'payable', - type: 'function', + name: "LogBuy", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: 'address', - name: 'tokenA', - type: 'address', + indexed: true, + internalType: "address", + name: "tokenA", + type: "address", }, { - internalType: 'address', - name: 'tokenB', - type: 'address', + indexed: true, + internalType: "address", + name: "tokenB", + type: "address", }, { - internalType: 'uint256', - name: 'amtA', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "amtA", + type: "uint256", }, { - internalType: 'uint256', - name: 'unitAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "amtB", + type: "uint256", }, { - internalType: 'uint256', - name: 'slippage', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "uniAmount", + type: "uint256", }, { - internalType: 'uint256', - name: 'getId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "getIdA", + type: "uint256", }, { - internalType: 'uint256', - name: 'setId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "getIdB", + type: "uint256", }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ { - internalType: 'string', - name: '', - type: 'string', + indexed: false, + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - stateMutability: 'view', - type: 'function', + name: "LogDepositLiquidity", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: 'address', - name: 'buyAddr', - type: 'address', + indexed: true, + internalType: "address", + name: "buyToken", + type: "address", }, { - internalType: 'address', - name: 'sellAddr', - type: 'address', + indexed: true, + internalType: "address", + name: "sellToken", + type: "address", }, { - internalType: 'uint256', - name: 'sellAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "buyAmt", + type: "uint256", }, { - internalType: 'uint256', - name: 'unitAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "sellAmt", + type: "uint256", }, { - internalType: 'uint256', - name: 'getId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "getId", + type: "uint256", }, { - internalType: 'uint256', - name: 'setId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "setId", + type: "uint256", }, ], - name: 'sell', - outputs: [], - stateMutability: 'payable', - type: 'function', + name: "LogSell", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: 'address', - name: 'tokenA', - type: 'address', + indexed: true, + internalType: "address", + name: "tokenA", + type: "address", }, { - internalType: 'address', - name: 'tokenB', - type: 'address', + indexed: true, + internalType: "address", + name: "tokenB", + type: "address", }, { - internalType: 'uint256', - name: 'uniAmt', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "amountA", + type: "uint256", }, { - internalType: 'uint256', - name: 'unitAmtA', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "amountB", + type: "uint256", }, { - internalType: 'uint256', - name: 'unitAmtB', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "uniAmount", + type: "uint256", }, { - internalType: 'uint256', - name: 'getId', - type: 'uint256', + indexed: false, + internalType: "uint256", + name: "getId", + type: "uint256", }, { - internalType: 'uint256[]', - name: 'setIds', - type: 'uint256[]', + indexed: false, + internalType: "uint256[]", + name: "setId", + type: "uint256[]", }, ], - name: 'withdraw', + name: "LogWithdrawLiquidity", + type: "event", + }, + { + inputs: [ + { internalType: "address", name: "buyAddr", type: "address" }, + { internalType: "address", name: "sellAddr", type: "address" }, + { internalType: "uint256", name: "buyAmt", type: "uint256" }, + { internalType: "uint256", name: "unitAmt", type: "uint256" }, + { internalType: "uint256", name: "getId", type: "uint256" }, + { internalType: "uint256", name: "setId", type: "uint256" }, + ], + name: "buy", outputs: [], - stateMutability: 'payable', - type: 'function', + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "connectorID", + outputs: [ + { internalType: "uint256", name: "model", type: "uint256" }, + { internalType: "uint256", name: "id", type: "uint256" }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "tokenA", type: "address" }, + { internalType: "address", name: "tokenB", type: "address" }, + { + internalType: "uint256", + name: "amountADesired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountBDesired", + type: "uint256", + }, + { internalType: "uint256", name: "slippage", type: "uint256" }, + { internalType: "uint256", name: "getIdA", type: "uint256" }, + { internalType: "uint256", name: "getIdB", type: "uint256" }, + { internalType: "uint256", name: "setId", type: "uint256" }, + ], + name: "deposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "buyAddr", type: "address" }, + { internalType: "address", name: "sellAddr", type: "address" }, + { internalType: "uint256", name: "sellAmt", type: "uint256" }, + { internalType: "uint256", name: "unitAmt", type: "uint256" }, + { internalType: "uint256", name: "getId", type: "uint256" }, + { internalType: "uint256", name: "setId", type: "uint256" }, + ], + name: "sell", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "tokenA", type: "address" }, + { internalType: "address", name: "tokenB", type: "address" }, + { internalType: "uint256", name: "amountA", type: "uint256" }, + { + internalType: "uint256", + name: "minUniAmount", + type: "uint256", + }, + { internalType: "uint256", name: "getId", type: "uint256" }, + { internalType: "uint256", name: "setId", type: "uint256" }, + ], + name: "singleDeposit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "tokenA", type: "address" }, + { internalType: "address", name: "tokenB", type: "address" }, + { internalType: "uint256", name: "uniAmt", type: "uint256" }, + { internalType: "uint256", name: "unitAmtA", type: "uint256" }, + { internalType: "uint256", name: "unitAmtB", type: "uint256" }, + { internalType: "uint256", name: "getId", type: "uint256" }, + { internalType: "uint256[]", name: "setIds", type: "uint256[]" }, + ], + name: "withdraw", + outputs: [], + stateMutability: "payable", + type: "function", }, ] +