@avail-project/ca-common 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/balances/ub-api.js +25 -0
- package/dist/cjs/cosmos/index.js +31 -0
- package/dist/cjs/data/chaindata.js +680 -0
- package/dist/cjs/data/chainid.js +91 -0
- package/dist/cjs/data/currency.js +77 -0
- package/dist/cjs/data/index.js +7 -0
- package/dist/cjs/data/utils.js +44 -0
- package/dist/cjs/evmabi/erc20.abi.js +349 -0
- package/dist/cjs/evmabi/index.js +6 -0
- package/dist/cjs/evmabi/vault.abi.js +1021 -0
- package/dist/cjs/evmabi/yakaggregator.abi.js +275 -0
- package/dist/cjs/fuelcontracts/ArcanaVault.js +2407 -0
- package/dist/cjs/fuelcontracts/ArcanaVaultFactory.js +18 -0
- package/dist/cjs/fuelcontracts/common.js +3 -0
- package/dist/cjs/fuelcontracts/index.js +5 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/permitutils/index.js +186 -0
- package/dist/cjs/proto/definition.js +4263 -0
- package/dist/cjs/proto/grpc.js +303 -0
- package/dist/cjs/rff/fuel.js +27 -0
- package/dist/cjs/rff/rff.js +77 -0
- package/dist/cjs/types/binarytypes.js +2 -0
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/types/msgpack-axios.js +22 -0
- package/dist/cjs/vaultcontracts/index.js +4 -0
- package/dist/cjs/vaultcontracts/vaultcontracts.js +145 -0
- package/dist/cjs/xcs/autochoice.js +374 -0
- package/dist/cjs/xcs/bebop-agg.js +128 -0
- package/dist/cjs/xcs/iface.js +13 -0
- package/dist/cjs/xcs/index.js +8 -0
- package/dist/cjs/xcs/lifi-agg.js +104 -0
- package/dist/cjs/xcs/yieldyak-agg.js +113 -0
- package/dist/esm/balances/ub-api.js +21 -0
- package/dist/esm/cosmos/index.js +26 -0
- package/dist/esm/data/chaindata.js +677 -0
- package/dist/esm/data/chainid.js +85 -0
- package/dist/esm/data/currency.js +72 -0
- package/dist/esm/data/index.js +4 -0
- package/dist/esm/data/utils.js +34 -0
- package/dist/esm/evmabi/erc20.abi.js +346 -0
- package/dist/esm/evmabi/index.js +3 -0
- package/dist/esm/evmabi/vault.abi.js +1018 -0
- package/dist/esm/evmabi/yakaggregator.abi.js +272 -0
- package/dist/esm/fuelcontracts/ArcanaVault.js +2402 -0
- package/dist/esm/fuelcontracts/ArcanaVaultFactory.js +14 -0
- package/dist/esm/fuelcontracts/common.js +2 -0
- package/dist/esm/fuelcontracts/index.js +2 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/permitutils/index.js +181 -0
- package/dist/esm/proto/definition.js +4255 -0
- package/dist/esm/proto/grpc.js +297 -0
- package/dist/esm/rff/fuel.js +23 -0
- package/dist/esm/rff/rff.js +73 -0
- package/dist/esm/types/binarytypes.js +1 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/msgpack-axios.js +18 -0
- package/dist/esm/vaultcontracts/index.js +1 -0
- package/dist/esm/vaultcontracts/vaultcontracts.js +141 -0
- package/dist/esm/xcs/autochoice.js +364 -0
- package/dist/esm/xcs/bebop-agg.js +123 -0
- package/dist/esm/xcs/iface.js +10 -0
- package/dist/esm/xcs/index.js +5 -0
- package/dist/esm/xcs/lifi-agg.js +99 -0
- package/dist/esm/xcs/yieldyak-agg.js +109 -0
- package/dist/types/balances/ub-api.d.ts +14 -0
- package/dist/types/cosmos/index.d.ts +6 -0
- package/dist/types/data/chaindata.d.ts +20 -0
- package/dist/types/data/chainid.d.ts +31 -0
- package/dist/types/data/currency.d.ts +29 -0
- package/dist/types/data/index.d.ts +4 -0
- package/dist/types/data/utils.d.ts +10 -0
- package/dist/types/evmabi/erc20.abi.d.ts +264 -0
- package/dist/types/evmabi/index.d.ts +3 -0
- package/dist/types/evmabi/vault.abi.d.ts +785 -0
- package/dist/types/evmabi/yakaggregator.abi.d.ts +298 -0
- package/dist/types/fuelcontracts/ArcanaVault.d.ts +448 -0
- package/dist/types/fuelcontracts/ArcanaVaultFactory.d.ts +8 -0
- package/dist/types/fuelcontracts/common.d.ts +23 -0
- package/dist/types/fuelcontracts/index.d.ts +2 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/permitutils/index.d.ts +13 -0
- package/dist/types/proto/definition.d.ts +373 -0
- package/dist/types/proto/grpc.d.ts +75 -0
- package/dist/types/rff/fuel.d.ts +4 -0
- package/dist/types/rff/rff.d.ts +12 -0
- package/dist/types/types/binarytypes.d.ts +1 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/msgpack-axios.d.ts +1 -0
- package/dist/types/vaultcontracts/index.d.ts +22 -0
- package/dist/types/vaultcontracts/vaultcontracts.d.ts +8 -0
- package/dist/types/xcs/autochoice.d.ts +57 -0
- package/dist/types/xcs/bebop-agg.d.ts +104 -0
- package/dist/types/xcs/iface.d.ts +36 -0
- package/dist/types/xcs/index.d.ts +5 -0
- package/dist/types/xcs/lifi-agg.d.ts +35 -0
- package/dist/types/xcs/yieldyak-agg.d.ts +21 -0
- package/package.json +63 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { bytesToHex } from "viem";
|
|
2
|
+
import { clone as _clone, groupBy, last as _last, maxBy } from "es-toolkit";
|
|
3
|
+
import { QuoteType } from "./iface";
|
|
4
|
+
import { encodeChainID36 } from "../data";
|
|
5
|
+
import { Universe } from "../proto/definition";
|
|
6
|
+
import { YakAggregatorABI } from "../evmabi/yakaggregator.abi";
|
|
7
|
+
const YakAggregatorAddresses = new Map([
|
|
8
|
+
[encodeChainID36(Universe.ETHEREUM, 42161), '0xb32C79a25291265eF240Eb32E9faBbc6DcEE3cE3'],
|
|
9
|
+
[encodeChainID36(Universe.ETHEREUM, 10), '0xCd887F78c77b36B0b541E77AfD6F91C0253182A2'],
|
|
10
|
+
[encodeChainID36(Universe.ETHEREUM, 43114), '0xC4729E56b831d74bBc18797e0e17A295fA77488c'],
|
|
11
|
+
].map(([chainID, addr]) => {
|
|
12
|
+
return [bytesToHex(chainID), addr];
|
|
13
|
+
}));
|
|
14
|
+
export class YieldYakAggregator {
|
|
15
|
+
clients = new Map();
|
|
16
|
+
constructor(clients) {
|
|
17
|
+
for (const client of clients) {
|
|
18
|
+
const chainIDHex = bytesToHex(client.chainID.toBytes());
|
|
19
|
+
const aggAddr = YakAggregatorAddresses.get(chainIDHex);
|
|
20
|
+
if (aggAddr == null) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
this.clients.set(chainIDHex, {
|
|
24
|
+
chainID: client.chainID,
|
|
25
|
+
client: client.client,
|
|
26
|
+
aggregatorAddress: aggAddr
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async getQuotes(_requests) {
|
|
31
|
+
const requestsWithOriginalIndexes = _requests.map((r, rid) => {
|
|
32
|
+
return {
|
|
33
|
+
req: r,
|
|
34
|
+
idx: rid,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const responses = new Array(_requests.length).fill(null);
|
|
38
|
+
// it's so sad that JS doesn't have a proper binary data type
|
|
39
|
+
const groupedByChainID = groupBy(requestsWithOriginalIndexes, r => bytesToHex(r.req.chain.toBytes()));
|
|
40
|
+
await Promise.all(Array.from(Object.entries(groupedByChainID)).map(async ([chainIDHex, requests]) => {
|
|
41
|
+
const config = this.clients.get(chainIDHex);
|
|
42
|
+
if (config == null) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const reverseIndexes = [];
|
|
46
|
+
const mc3calls = [];
|
|
47
|
+
for (const req of requests) {
|
|
48
|
+
const inputTokenHex = bytesToHex(req.req.inputToken.subarray(12));
|
|
49
|
+
const outputTokenHex = bytesToHex(req.req.outputToken.subarray(12));
|
|
50
|
+
let args;
|
|
51
|
+
switch (req.req.type) {
|
|
52
|
+
case QuoteType.EXACT_IN: {
|
|
53
|
+
args = [req.req.inputAmount, inputTokenHex, outputTokenHex, 0, 1];
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case QuoteType.EXACT_OUT: {
|
|
57
|
+
args = [req.req.outputAmount, outputTokenHex, inputTokenHex, 0, 1];
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const indexes = [];
|
|
62
|
+
for (let steps = 1; steps !== 5; steps++) {
|
|
63
|
+
const clonedArgs = _clone(args);
|
|
64
|
+
clonedArgs[3] = steps;
|
|
65
|
+
const idx = mc3calls.push({
|
|
66
|
+
address: config.aggregatorAddress,
|
|
67
|
+
abi: YakAggregatorABI,
|
|
68
|
+
functionName: 'findBestPathWithGas',
|
|
69
|
+
args: clonedArgs
|
|
70
|
+
});
|
|
71
|
+
indexes.push(idx - 1);
|
|
72
|
+
}
|
|
73
|
+
reverseIndexes.push([req, indexes]);
|
|
74
|
+
}
|
|
75
|
+
const _final = await config.client.multicall({
|
|
76
|
+
allowFailure: false,
|
|
77
|
+
contracts: mc3calls,
|
|
78
|
+
multicallAddress: '0xcA11bde05977b3631167028862bE2a173976CA11'
|
|
79
|
+
});
|
|
80
|
+
for (const [req, indexes] of reverseIndexes) {
|
|
81
|
+
const collected = [];
|
|
82
|
+
for (const index of indexes) {
|
|
83
|
+
collected.push(_final[index]);
|
|
84
|
+
}
|
|
85
|
+
// @ts-expect-error the typing in maxBy is wrong, it can work with anything that is comparable
|
|
86
|
+
const optimalChoice = maxBy(collected, route => _last(route.amounts));
|
|
87
|
+
if (optimalChoice.path.length === 0) {
|
|
88
|
+
responses[req.idx] = null;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// we have to reverse everything
|
|
92
|
+
if (req.req.type === QuoteType.EXACT_OUT) {
|
|
93
|
+
optimalChoice.adapters.reverse();
|
|
94
|
+
optimalChoice.amounts.reverse();
|
|
95
|
+
optimalChoice.path.reverse();
|
|
96
|
+
}
|
|
97
|
+
const output = _last(optimalChoice.amounts);
|
|
98
|
+
responses[req.idx] = {
|
|
99
|
+
type: req.req.type,
|
|
100
|
+
inputAmount: optimalChoice.amounts[0],
|
|
101
|
+
outputAmountLikely: output,
|
|
102
|
+
outputAmountMinimum: output,
|
|
103
|
+
offer: optimalChoice
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
107
|
+
return responses;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Decimal from "decimal.js";
|
|
2
|
+
import { Universe } from "../proto/definition";
|
|
3
|
+
import { Bytes } from "../types";
|
|
4
|
+
import { OmniversalChainID } from "../data";
|
|
5
|
+
export type BalanceOnChain = {
|
|
6
|
+
chainID: OmniversalChainID;
|
|
7
|
+
totalValue: Decimal;
|
|
8
|
+
currencywise: {
|
|
9
|
+
tokenAddress: Buffer;
|
|
10
|
+
amount: Decimal;
|
|
11
|
+
value: Decimal;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
export declare function getBalances(vscURL: string, universe: Universe, address: Bytes): Promise<BalanceOnChain[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Registry as CosmosRegistry, OfflineDirectSigner, DirectSecp256k1Wallet } from "@cosmjs/proto-signing";
|
|
2
|
+
import { HttpEndpoint, SigningStargateClient, SigningStargateClientOptions } from "@cosmjs/stargate";
|
|
3
|
+
import { Bytes } from "../types";
|
|
4
|
+
export declare const Registry: CosmosRegistry;
|
|
5
|
+
export declare function createCosmosWallet(privateKey: string | Bytes): Promise<DirectSecp256k1Wallet>;
|
|
6
|
+
export declare function createCosmosClient(signer: OfflineDirectSigner, endpoint: string | HttpEndpoint, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Universe } from "../proto/definition";
|
|
2
|
+
import { ChainIDKeyedMap, OmniversalChainID } from "./chainid";
|
|
3
|
+
import { Currency } from "./currency";
|
|
4
|
+
import { ezPadTo32Hex } from "./utils";
|
|
5
|
+
declare class CurrencyMap {
|
|
6
|
+
private readonly map;
|
|
7
|
+
constructor(currencies: Currency[]);
|
|
8
|
+
get(input: Parameters<typeof ezPadTo32Hex>[0]): Currency | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type ChainDatum = {
|
|
11
|
+
ChainID: OmniversalChainID;
|
|
12
|
+
Universe: Universe;
|
|
13
|
+
ChainID32: Buffer;
|
|
14
|
+
Currencies: Currency[];
|
|
15
|
+
CurrencyMap: CurrencyMap;
|
|
16
|
+
};
|
|
17
|
+
export declare const Chaindata: ChainDatum[];
|
|
18
|
+
export declare const ChaindataMap: ChainIDKeyedMap<ChainDatum>;
|
|
19
|
+
export declare const RPCURLMap: ChainIDKeyedMap<string>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
import { Universe } from "../proto/definition";
|
|
3
|
+
import { Bytes } from "../types";
|
|
4
|
+
export declare function encodeChainID36(universe: Universe, chainID: Bytes | bigint | number): Buffer;
|
|
5
|
+
export declare class OmniversalChainID {
|
|
6
|
+
readonly universe: Universe;
|
|
7
|
+
readonly chainID: bigint;
|
|
8
|
+
private readonly binaryForm;
|
|
9
|
+
constructor(universe: Universe, chainID: bigint | number | string | Bytes);
|
|
10
|
+
toString(): string;
|
|
11
|
+
toJSON(): {
|
|
12
|
+
universe: string;
|
|
13
|
+
chainID: `0x${string}`;
|
|
14
|
+
};
|
|
15
|
+
static fromJSON(input: {
|
|
16
|
+
universe: string;
|
|
17
|
+
chainID: Hex;
|
|
18
|
+
}): OmniversalChainID;
|
|
19
|
+
static fromChainID36(_input: Bytes): OmniversalChainID;
|
|
20
|
+
toBytes(): Buffer;
|
|
21
|
+
equals(rhs: OmniversalChainID): boolean;
|
|
22
|
+
static equals(lhs: OmniversalChainID, rhs: OmniversalChainID): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class ChainIDKeyedMap<V> {
|
|
25
|
+
private readonly map;
|
|
26
|
+
constructor(entries?: readonly [OmniversalChainID, V][] | null);
|
|
27
|
+
get(key: OmniversalChainID): V | undefined;
|
|
28
|
+
set(key: OmniversalChainID, value: V): this;
|
|
29
|
+
getFromChainID36(key: Bytes): V | undefined;
|
|
30
|
+
entries(): Generator<[OmniversalChainID, V]>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
import Decimal from "decimal.js";
|
|
3
|
+
import { Bytes } from "../types";
|
|
4
|
+
import { PermitVariant } from "../permitutils";
|
|
5
|
+
export declare enum CurrencyID {
|
|
6
|
+
USDC = 1,
|
|
7
|
+
USDT = 2,
|
|
8
|
+
ETH = 3,
|
|
9
|
+
POL = 4,
|
|
10
|
+
AVAX = 5,
|
|
11
|
+
BNB = 6,
|
|
12
|
+
HYPE = 16,
|
|
13
|
+
KAIA = 17,
|
|
14
|
+
SOPH = 18,
|
|
15
|
+
TRX = 19,
|
|
16
|
+
MON = 20
|
|
17
|
+
}
|
|
18
|
+
export declare class Currency {
|
|
19
|
+
readonly currencyID: CurrencyID;
|
|
20
|
+
readonly decimals: number;
|
|
21
|
+
readonly permitVariant: PermitVariant;
|
|
22
|
+
readonly permitContractVersion: number;
|
|
23
|
+
readonly isGasToken: boolean;
|
|
24
|
+
readonly tokenAddress: Buffer;
|
|
25
|
+
private readonly oneUnitToAtomicUnitRatio;
|
|
26
|
+
constructor(currencyID: CurrencyID, tokenAddress: string | Bytes | number[], decimals: number, permitVariant: PermitVariant, permitContractVersion: number | undefined, isGasToken: boolean);
|
|
27
|
+
convertUnitsToAmountDecimal(input: bigint | number | Hex | Bytes): Decimal;
|
|
28
|
+
convertAmountToUnitsInBinary(input: Decimal): Buffer;
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Hex, toHex } from "viem";
|
|
2
|
+
import Decimal from "decimal.js";
|
|
3
|
+
import { Bytes } from "../types";
|
|
4
|
+
export declare function convertToBufferIfNecessary(buf: Bytes): Buffer<ArrayBufferLike>;
|
|
5
|
+
export declare function zeroExtendBufToGivenSize(buf: Bytes, size?: number): Buffer;
|
|
6
|
+
export declare function ezPadTo32Hex(input: Hex | Parameters<typeof toHex>[0]): Hex;
|
|
7
|
+
export declare function convertDecimalToBigInt(dec: Decimal): bigint;
|
|
8
|
+
export declare function convertBigIntToDecimal(big: bigint): Decimal;
|
|
9
|
+
export declare function maxByBigInt<T>(items: readonly T[], getValue: (element: T) => bigint): T;
|
|
10
|
+
export declare function minByBigInt<T>(items: readonly T[], getValue: (element: T) => bigint): T;
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
export declare const ERC20ABI: readonly [{
|
|
2
|
+
readonly constant: true;
|
|
3
|
+
readonly inputs: readonly [];
|
|
4
|
+
readonly name: "name";
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
}];
|
|
9
|
+
readonly payable: false;
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
readonly type: "function";
|
|
12
|
+
}, {
|
|
13
|
+
readonly constant: false;
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly name: "_spender";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "_value";
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
}];
|
|
21
|
+
readonly name: "approve";
|
|
22
|
+
readonly outputs: readonly [{
|
|
23
|
+
readonly name: "";
|
|
24
|
+
readonly type: "bool";
|
|
25
|
+
}];
|
|
26
|
+
readonly payable: false;
|
|
27
|
+
readonly stateMutability: "nonpayable";
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
}, {
|
|
30
|
+
readonly constant: true;
|
|
31
|
+
readonly inputs: readonly [];
|
|
32
|
+
readonly name: "totalSupply";
|
|
33
|
+
readonly outputs: readonly [{
|
|
34
|
+
readonly name: "";
|
|
35
|
+
readonly type: "uint256";
|
|
36
|
+
}];
|
|
37
|
+
readonly payable: false;
|
|
38
|
+
readonly stateMutability: "view";
|
|
39
|
+
readonly type: "function";
|
|
40
|
+
}, {
|
|
41
|
+
readonly constant: false;
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly name: "_from";
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "_to";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "_value";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
}];
|
|
52
|
+
readonly name: "transferFrom";
|
|
53
|
+
readonly outputs: readonly [{
|
|
54
|
+
readonly name: "";
|
|
55
|
+
readonly type: "bool";
|
|
56
|
+
}];
|
|
57
|
+
readonly payable: false;
|
|
58
|
+
readonly stateMutability: "nonpayable";
|
|
59
|
+
readonly type: "function";
|
|
60
|
+
}, {
|
|
61
|
+
readonly constant: true;
|
|
62
|
+
readonly inputs: readonly [];
|
|
63
|
+
readonly name: "decimals";
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "uint8";
|
|
67
|
+
}];
|
|
68
|
+
readonly payable: false;
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
readonly type: "function";
|
|
71
|
+
}, {
|
|
72
|
+
readonly constant: true;
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "_owner";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}];
|
|
77
|
+
readonly name: "balanceOf";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly name: "balance";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}];
|
|
82
|
+
readonly payable: false;
|
|
83
|
+
readonly stateMutability: "view";
|
|
84
|
+
readonly type: "function";
|
|
85
|
+
}, {
|
|
86
|
+
readonly constant: true;
|
|
87
|
+
readonly inputs: readonly [];
|
|
88
|
+
readonly name: "symbol";
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
}];
|
|
93
|
+
readonly payable: false;
|
|
94
|
+
readonly stateMutability: "view";
|
|
95
|
+
readonly type: "function";
|
|
96
|
+
}, {
|
|
97
|
+
readonly constant: false;
|
|
98
|
+
readonly inputs: readonly [{
|
|
99
|
+
readonly name: "_to";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "_value";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
}];
|
|
105
|
+
readonly name: "transfer";
|
|
106
|
+
readonly outputs: readonly [{
|
|
107
|
+
readonly name: "";
|
|
108
|
+
readonly type: "bool";
|
|
109
|
+
}];
|
|
110
|
+
readonly payable: false;
|
|
111
|
+
readonly stateMutability: "nonpayable";
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
}, {
|
|
114
|
+
readonly constant: true;
|
|
115
|
+
readonly inputs: readonly [{
|
|
116
|
+
readonly name: "_owner";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "_spender";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}];
|
|
122
|
+
readonly name: "allowance";
|
|
123
|
+
readonly outputs: readonly [{
|
|
124
|
+
readonly name: "";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
readonly payable: false;
|
|
128
|
+
readonly stateMutability: "view";
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
}, {
|
|
131
|
+
readonly payable: true;
|
|
132
|
+
readonly stateMutability: "payable";
|
|
133
|
+
readonly type: "fallback";
|
|
134
|
+
}, {
|
|
135
|
+
readonly anonymous: false;
|
|
136
|
+
readonly inputs: readonly [{
|
|
137
|
+
readonly indexed: true;
|
|
138
|
+
readonly name: "owner";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}, {
|
|
141
|
+
readonly indexed: true;
|
|
142
|
+
readonly name: "spender";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly indexed: false;
|
|
146
|
+
readonly name: "value";
|
|
147
|
+
readonly type: "uint256";
|
|
148
|
+
}];
|
|
149
|
+
readonly name: "Approval";
|
|
150
|
+
readonly type: "event";
|
|
151
|
+
}, {
|
|
152
|
+
readonly anonymous: false;
|
|
153
|
+
readonly inputs: readonly [{
|
|
154
|
+
readonly indexed: true;
|
|
155
|
+
readonly name: "from";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}, {
|
|
158
|
+
readonly indexed: true;
|
|
159
|
+
readonly name: "to";
|
|
160
|
+
readonly type: "address";
|
|
161
|
+
}, {
|
|
162
|
+
readonly indexed: false;
|
|
163
|
+
readonly name: "value";
|
|
164
|
+
readonly type: "uint256";
|
|
165
|
+
}];
|
|
166
|
+
readonly name: "Transfer";
|
|
167
|
+
readonly type: "event";
|
|
168
|
+
}, {
|
|
169
|
+
readonly comment: "From the EIP-2612 spec.";
|
|
170
|
+
readonly inputs: readonly [{
|
|
171
|
+
readonly internalType: "address";
|
|
172
|
+
readonly name: "owner";
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
}];
|
|
175
|
+
readonly name: "nonces";
|
|
176
|
+
readonly outputs: readonly [{
|
|
177
|
+
readonly internalType: "uint256";
|
|
178
|
+
readonly name: "";
|
|
179
|
+
readonly type: "uint256";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "view";
|
|
182
|
+
readonly type: "function";
|
|
183
|
+
}, {
|
|
184
|
+
readonly comment: "From the EIP-2612 spec.";
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly internalType: "address";
|
|
187
|
+
readonly name: "owner";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
}, {
|
|
190
|
+
readonly internalType: "address";
|
|
191
|
+
readonly name: "spender";
|
|
192
|
+
readonly type: "address";
|
|
193
|
+
}, {
|
|
194
|
+
readonly internalType: "uint256";
|
|
195
|
+
readonly name: "value";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
}, {
|
|
198
|
+
readonly internalType: "uint256";
|
|
199
|
+
readonly name: "deadline";
|
|
200
|
+
readonly type: "uint256";
|
|
201
|
+
}, {
|
|
202
|
+
readonly internalType: "uint8";
|
|
203
|
+
readonly name: "v";
|
|
204
|
+
readonly type: "uint8";
|
|
205
|
+
}, {
|
|
206
|
+
readonly internalType: "bytes32";
|
|
207
|
+
readonly name: "r";
|
|
208
|
+
readonly type: "bytes32";
|
|
209
|
+
}, {
|
|
210
|
+
readonly internalType: "bytes32";
|
|
211
|
+
readonly name: "s";
|
|
212
|
+
readonly type: "bytes32";
|
|
213
|
+
}];
|
|
214
|
+
readonly name: "permit";
|
|
215
|
+
readonly outputs: readonly [];
|
|
216
|
+
readonly stateMutability: "nonpayable";
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
}, {
|
|
219
|
+
readonly comment: "Available on bridged tokens on Polygon.";
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly internalType: "address";
|
|
222
|
+
readonly name: "userAddress";
|
|
223
|
+
readonly type: "address";
|
|
224
|
+
}, {
|
|
225
|
+
readonly internalType: "bytes";
|
|
226
|
+
readonly name: "functionSignature";
|
|
227
|
+
readonly type: "bytes";
|
|
228
|
+
}, {
|
|
229
|
+
readonly internalType: "bytes32";
|
|
230
|
+
readonly name: "sigR";
|
|
231
|
+
readonly type: "bytes32";
|
|
232
|
+
}, {
|
|
233
|
+
readonly internalType: "bytes32";
|
|
234
|
+
readonly name: "sigS";
|
|
235
|
+
readonly type: "bytes32";
|
|
236
|
+
}, {
|
|
237
|
+
readonly internalType: "uint8";
|
|
238
|
+
readonly name: "sigV";
|
|
239
|
+
readonly type: "uint8";
|
|
240
|
+
}];
|
|
241
|
+
readonly name: "executeMetaTransaction";
|
|
242
|
+
readonly outputs: readonly [{
|
|
243
|
+
readonly internalType: "bytes";
|
|
244
|
+
readonly name: "";
|
|
245
|
+
readonly type: "bytes";
|
|
246
|
+
}];
|
|
247
|
+
readonly stateMutability: "payable";
|
|
248
|
+
readonly type: "function";
|
|
249
|
+
}, {
|
|
250
|
+
readonly comment: "Available on bridged tokens on Polygon.";
|
|
251
|
+
readonly inputs: readonly [{
|
|
252
|
+
readonly internalType: "address";
|
|
253
|
+
readonly name: "user";
|
|
254
|
+
readonly type: "address";
|
|
255
|
+
}];
|
|
256
|
+
readonly name: "getNonce";
|
|
257
|
+
readonly outputs: readonly [{
|
|
258
|
+
readonly internalType: "uint256";
|
|
259
|
+
readonly name: "nonce";
|
|
260
|
+
readonly type: "uint256";
|
|
261
|
+
}];
|
|
262
|
+
readonly stateMutability: "view";
|
|
263
|
+
readonly type: "function";
|
|
264
|
+
}];
|