@swapkit/helpers 4.0.0-beta.32 → 4.0.0-beta.34
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/api/index.js +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/{chunk-ganzk321.js → chunk-hm14bfyg.js} +3 -3
- package/dist/{chunk-fazw0jvt.js.map → chunk-hm14bfyg.js.map} +1 -1
- package/dist/chunk-vb4wtm2w.js +4 -0
- package/dist/{chunk-ganzk321.js.map → chunk-vb4wtm2w.js.map} +1 -1
- package/dist/contracts.cjs +4 -0
- package/dist/contracts.cjs.map +10 -0
- package/dist/contracts.js +4 -0
- package/dist/contracts.js.map +10 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +11 -11
- package/dist/index.js +3 -3
- package/dist/index.js.map +11 -11
- package/dist/tokens.cjs +4 -0
- package/dist/tokens.cjs.map +10 -0
- package/dist/tokens.js +4 -0
- package/dist/tokens.js.map +10 -0
- package/dist/types/api/index.d.ts +238 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/microgard/endpoints.d.ts +25 -0
- package/dist/types/api/microgard/endpoints.d.ts.map +1 -0
- package/dist/types/api/microgard/types.d.ts +56 -0
- package/dist/types/api/microgard/types.d.ts.map +1 -0
- package/dist/types/api/midgard/endpoints.d.ts +35 -0
- package/dist/types/api/midgard/endpoints.d.ts.map +1 -0
- package/dist/types/api/midgard/types.d.ts +102 -0
- package/dist/types/api/midgard/types.d.ts.map +1 -0
- package/dist/types/api/swapkitApi/endpoints.d.ts +194 -0
- package/dist/types/api/swapkitApi/endpoints.d.ts.map +1 -0
- package/dist/types/api/swapkitApi/types.d.ts +7238 -0
- package/dist/types/api/swapkitApi/types.d.ts.map +1 -0
- package/dist/types/api/thornode/endpoints.d.ts +31 -0
- package/dist/types/api/thornode/endpoints.d.ts.map +1 -0
- package/dist/types/api/thornode/types.d.ts +264 -0
- package/dist/types/api/thornode/types.d.ts.map +1 -0
- package/dist/types/api/thorswapStatic/endpoints.d.ts +7 -0
- package/dist/types/api/thorswapStatic/endpoints.d.ts.map +1 -0
- package/dist/types/api/thorswapStatic/types.d.ts +22 -0
- package/dist/types/api/thorswapStatic/types.d.ts.map +1 -0
- package/dist/types/contracts.d.ts +2 -0
- package/dist/types/contracts.d.ts.map +1 -0
- package/{src/index.ts → dist/types/index.d.ts} +3 -4
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/modules/assetValue.d.ts +71 -0
- package/dist/types/modules/assetValue.d.ts.map +1 -0
- package/dist/types/modules/bigIntArithmetics.d.ts +56 -0
- package/dist/types/modules/bigIntArithmetics.d.ts.map +1 -0
- package/dist/types/modules/feeMultiplier.d.ts +45 -0
- package/dist/types/modules/feeMultiplier.d.ts.map +1 -0
- package/dist/types/modules/requestClient.d.ts +22 -0
- package/dist/types/modules/requestClient.d.ts.map +1 -0
- package/dist/types/modules/swapKitConfig.d.ts +98 -0
- package/dist/types/modules/swapKitConfig.d.ts.map +1 -0
- package/dist/types/modules/swapKitError.d.ts +829 -0
- package/dist/types/modules/swapKitError.d.ts.map +1 -0
- package/dist/types/modules/swapKitNumber.d.ts +7 -0
- package/dist/types/modules/swapKitNumber.d.ts.map +1 -0
- package/dist/types/tokens.d.ts +2 -0
- package/dist/types/tokens.d.ts.map +1 -0
- package/dist/types/types/chains.d.ts +187 -0
- package/dist/types/types/chains.d.ts.map +1 -0
- package/dist/types/types/commonTypes.d.ts +37 -0
- package/dist/types/types/commonTypes.d.ts.map +1 -0
- package/dist/types/types/derivationPath.d.ts +17 -0
- package/dist/types/types/derivationPath.d.ts.map +1 -0
- package/dist/types/types/errors/apiV1.d.ts +2 -0
- package/dist/types/types/errors/apiV1.d.ts.map +1 -0
- package/{src/types/index.ts → dist/types/types/index.d.ts} +1 -1
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/quotes.d.ts +170 -0
- package/dist/types/types/quotes.d.ts.map +1 -0
- package/dist/types/types/radix.d.ts +15 -0
- package/dist/types/types/radix.d.ts.map +1 -0
- package/dist/types/types/sdk.d.ts +35 -0
- package/dist/types/types/sdk.d.ts.map +1 -0
- package/dist/types/types/wallet.d.ts +121 -0
- package/dist/types/types/wallet.d.ts.map +1 -0
- package/dist/types/utils/asset.d.ts +40 -0
- package/dist/types/utils/asset.d.ts.map +1 -0
- package/dist/types/utils/derivationPath.d.ts +19 -0
- package/dist/types/utils/derivationPath.d.ts.map +1 -0
- package/dist/types/utils/explorerUrls.d.ts +10 -0
- package/dist/types/utils/explorerUrls.d.ts.map +1 -0
- package/dist/types/utils/liquidity.d.ts +59 -0
- package/dist/types/utils/liquidity.d.ts.map +1 -0
- package/dist/types/utils/memo.d.ts +65 -0
- package/dist/types/utils/memo.d.ts.map +1 -0
- package/dist/types/utils/others.d.ts +9 -0
- package/dist/types/utils/others.d.ts.map +1 -0
- package/dist/types/utils/validators.d.ts +3 -0
- package/dist/types/utils/validators.d.ts.map +1 -0
- package/dist/types/utils/wallets.d.ts +32 -0
- package/dist/types/utils/wallets.d.ts.map +1 -0
- package/package.json +14 -15
- package/dist/chunk-06q78xy3.js +0 -4
- package/dist/chunk-06q78xy3.js.map +0 -10
- package/dist/chunk-0q5vvg5c.js +0 -5
- package/dist/chunk-0q5vvg5c.js.map +0 -10
- package/dist/chunk-18bxh1n7.js +0 -5
- package/dist/chunk-18bxh1n7.js.map +0 -10
- package/dist/chunk-3qya5ng9.js +0 -4
- package/dist/chunk-3qya5ng9.js.map +0 -10
- package/dist/chunk-4yqymkbp.js +0 -5
- package/dist/chunk-4yqymkbp.js.map +0 -10
- package/dist/chunk-50gpwcq9.js +0 -4
- package/dist/chunk-50gpwcq9.js.map +0 -10
- package/dist/chunk-6atq9cs7.js +0 -4
- package/dist/chunk-6atq9cs7.js.map +0 -10
- package/dist/chunk-6m0d5pv4.js +0 -5
- package/dist/chunk-6m0d5pv4.js.map +0 -10
- package/dist/chunk-8x46g3wq.js +0 -5
- package/dist/chunk-8x46g3wq.js.map +0 -10
- package/dist/chunk-92sk0g47.js +0 -5
- package/dist/chunk-92sk0g47.js.map +0 -10
- package/dist/chunk-9f2b3enk.js +0 -5
- package/dist/chunk-9f2b3enk.js.map +0 -10
- package/dist/chunk-adrafsdk.js +0 -5
- package/dist/chunk-adrafsdk.js.map +0 -10
- package/dist/chunk-b1hang9z.js +0 -5
- package/dist/chunk-b1hang9z.js.map +0 -10
- package/dist/chunk-becdmywt.js +0 -4
- package/dist/chunk-becdmywt.js.map +0 -10
- package/dist/chunk-ehz0t9d1.js +0 -4
- package/dist/chunk-ehz0t9d1.js.map +0 -10
- package/dist/chunk-fazw0jvt.js +0 -4
- package/dist/chunk-fm9ycn0h.js +0 -5
- package/dist/chunk-fm9ycn0h.js.map +0 -10
- package/dist/chunk-g67e2r57.js +0 -4
- package/dist/chunk-g67e2r57.js.map +0 -10
- package/dist/chunk-he3vy8gt.js +0 -4
- package/dist/chunk-he3vy8gt.js.map +0 -10
- package/dist/chunk-jjayk2y5.js +0 -4
- package/dist/chunk-jjayk2y5.js.map +0 -10
- package/dist/chunk-mmyv2vsv.js +0 -5
- package/dist/chunk-mmyv2vsv.js.map +0 -10
- package/dist/chunk-phev7aw7.js +0 -4
- package/dist/chunk-phev7aw7.js.map +0 -10
- package/dist/chunk-rhqk87p2.js +0 -5
- package/dist/chunk-rhqk87p2.js.map +0 -10
- package/dist/chunk-rnv7fdjk.js +0 -4
- package/dist/chunk-rnv7fdjk.js.map +0 -10
- package/dist/chunk-rwh98p1c.js +0 -4
- package/dist/chunk-rwh98p1c.js.map +0 -10
- package/dist/chunk-v9zj2gsj.js +0 -5
- package/dist/chunk-v9zj2gsj.js.map +0 -10
- package/dist/chunk-vv5bgsn8.js +0 -4
- package/dist/chunk-vv5bgsn8.js.map +0 -10
- package/dist/chunk-vwh9jfxn.js +0 -5
- package/dist/chunk-vwh9jfxn.js.map +0 -10
- package/dist/chunk-x0rqy75t.js +0 -4
- package/dist/chunk-x0rqy75t.js.map +0 -10
- package/dist/contracts/index.cjs +0 -4
- package/dist/contracts/index.cjs.map +0 -38
- package/dist/contracts/index.js +0 -4
- package/dist/contracts/index.js.map +0 -38
- package/dist/tokens/index.cjs +0 -4
- package/dist/tokens/index.cjs.map +0 -10
- package/dist/tokens/index.js +0 -4
- package/dist/tokens/index.js.map +0 -10
- package/src/api/index.ts +0 -19
- package/src/api/microgard/endpoints.ts +0 -83
- package/src/api/microgard/types.ts +0 -57
- package/src/api/midgard/endpoints.ts +0 -90
- package/src/api/midgard/types.ts +0 -106
- package/src/api/swapkitApi/endpoints.ts +0 -193
- package/src/api/swapkitApi/types.ts +0 -635
- package/src/api/thornode/endpoints.ts +0 -116
- package/src/api/thornode/types.ts +0 -276
- package/src/api/thorswapStatic/endpoints.ts +0 -46
- package/src/api/thorswapStatic/types.ts +0 -18
- package/src/contracts/abis/avaxGeneric.ts +0 -92
- package/src/contracts/abis/avaxWoofi.ts +0 -145
- package/src/contracts/abis/bscGeneric.ts +0 -106
- package/src/contracts/abis/chainflipGateway.ts +0 -330
- package/src/contracts/abis/erc20.ts +0 -99
- package/src/contracts/abis/ethGeneric.ts +0 -92
- package/src/contracts/abis/mayaEvmVaults.ts +0 -331
- package/src/contracts/abis/pancakeV2.ts +0 -145
- package/src/contracts/abis/pangolin.ts +0 -120
- package/src/contracts/abis/sushiswap.ts +0 -120
- package/src/contracts/abis/tcEthVault.ts +0 -650
- package/src/contracts/abis/traderJoe.ts +0 -120
- package/src/contracts/abis/uniswapV2.ts +0 -120
- package/src/contracts/abis/uniswapV2Leg.ts +0 -128
- package/src/contracts/abis/uniswapV3_100.ts +0 -128
- package/src/contracts/abis/uniswapV3_10000.ts +0 -128
- package/src/contracts/abis/uniswapV3_3000.ts +0 -128
- package/src/contracts/abis/uniswapV3_500.ts +0 -128
- package/src/contracts/index.ts +0 -95
- package/src/contracts/routers/index.ts +0 -58
- package/src/contracts/routers/kyber.ts +0 -402
- package/src/contracts/routers/oneinch.ts +0 -2188
- package/src/contracts/routers/pancakeswap.ts +0 -340
- package/src/contracts/routers/pangolin.ts +0 -340
- package/src/contracts/routers/sushiswap.ts +0 -340
- package/src/contracts/routers/traderJoe.ts +0 -340
- package/src/contracts/routers/uniswapv2.ts +0 -340
- package/src/contracts/routers/uniswapv3.ts +0 -254
- package/src/contracts/routers/woofi.ts +0 -171
- package/src/modules/__tests__/assetValue.test.ts +0 -877
- package/src/modules/__tests__/bigIntArithmetics.test.ts +0 -30
- package/src/modules/__tests__/swapKitConfig.test.ts +0 -37
- package/src/modules/__tests__/swapKitNumber.test.ts +0 -560
- package/src/modules/assetValue.ts +0 -387
- package/src/modules/bigIntArithmetics.ts +0 -436
- package/src/modules/feeMultiplier.ts +0 -87
- package/src/modules/requestClient.ts +0 -83
- package/src/modules/swapKitConfig.ts +0 -143
- package/src/modules/swapKitError.ts +0 -442
- package/src/modules/swapKitNumber.ts +0 -16
- package/src/tokens/index.ts +0 -15
- package/src/tokens/lists/camelot_v3.ts +0 -16060
- package/src/tokens/lists/caviar_v1.ts +0 -1704
- package/src/tokens/lists/chainflip.ts +0 -104
- package/src/tokens/lists/index.ts +0 -14
- package/src/tokens/lists/jupiter.ts +0 -33563
- package/src/tokens/lists/mayachain.ts +0 -509
- package/src/tokens/lists/near.ts +0 -458
- package/src/tokens/lists/oneinch.ts +0 -15006
- package/src/tokens/lists/openocean_v2.ts +0 -12434
- package/src/tokens/lists/pancakeswap.ts +0 -6136
- package/src/tokens/lists/pangolin_v1.ts +0 -75
- package/src/tokens/lists/sushiswap_v2.ts +0 -595
- package/src/tokens/lists/thorchain.ts +0 -748
- package/src/tokens/lists/traderjoe_v2.ts +0 -594
- package/src/tokens/lists/uniswap_v2.ts +0 -11484
- package/src/tokens/lists/uniswap_v3.ts +0 -19424
- package/src/types/chains.ts +0 -555
- package/src/types/commonTypes.ts +0 -58
- package/src/types/derivationPath.ts +0 -58
- package/src/types/errors/apiV1.ts +0 -0
- package/src/types/quotes.ts +0 -172
- package/src/types/radix.ts +0 -14
- package/src/types/sdk.ts +0 -42
- package/src/types/tokens.ts +0 -17
- package/src/types/wallet.ts +0 -166
- package/src/utils/__tests__/asset.test.ts +0 -193
- package/src/utils/__tests__/derivationPath.test.ts +0 -16
- package/src/utils/__tests__/memo.test.ts +0 -103
- package/src/utils/__tests__/others.test.ts +0 -88
- package/src/utils/__tests__/validators.test.ts +0 -24
- package/src/utils/asset.ts +0 -231
- package/src/utils/derivationPath.ts +0 -98
- package/src/utils/liquidity.ts +0 -179
- package/src/utils/memo.ts +0 -143
- package/src/utils/others.ts +0 -86
- package/src/utils/plugin.ts +0 -13
- package/src/utils/tokens.ts +0 -73
- package/src/utils/validators.ts +0 -32
- package/src/utils/wallets.ts +0 -276
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { AssetValue, Chain, RequestClient, SKConfig, StagenetChain } from "@swapkit/helpers";
|
|
2
|
-
import type {
|
|
3
|
-
InboundAddressesItem,
|
|
4
|
-
LastBlockItem,
|
|
5
|
-
MimirData,
|
|
6
|
-
NodeItem,
|
|
7
|
-
RunePoolInfo,
|
|
8
|
-
RunePoolProviderInfo,
|
|
9
|
-
TCYClaimerResponse,
|
|
10
|
-
TCYClaimersResponse,
|
|
11
|
-
TCYStakerResponse,
|
|
12
|
-
TCYStakersResponse,
|
|
13
|
-
THORNodeTNSDetails,
|
|
14
|
-
THORNodeType,
|
|
15
|
-
} from "./types";
|
|
16
|
-
|
|
17
|
-
function baseUrl(type?: THORNodeType) {
|
|
18
|
-
const { isStagenet } = SKConfig.get("envs");
|
|
19
|
-
const nodeUrls = SKConfig.get("nodeUrls");
|
|
20
|
-
|
|
21
|
-
switch (type) {
|
|
22
|
-
case "mayachain": {
|
|
23
|
-
const mayaNodeUrl = nodeUrls[isStagenet ? StagenetChain.Maya : Chain.Maya];
|
|
24
|
-
|
|
25
|
-
return `${mayaNodeUrl}/mayachain`;
|
|
26
|
-
}
|
|
27
|
-
default: {
|
|
28
|
-
const thorNodeUrl = nodeUrls[isStagenet ? StagenetChain.THORChain : Chain.THORChain];
|
|
29
|
-
|
|
30
|
-
return `${thorNodeUrl}/thorchain`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function getNameServiceBaseUrl(type?: THORNodeType) {
|
|
36
|
-
const nsType = type === "mayachain" ? "mayaname" : "thorname";
|
|
37
|
-
|
|
38
|
-
return `${baseUrl(type)}/${nsType}`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function getLastBlock<T extends THORNodeType = "thorchain">(type: T = "thorchain" as T) {
|
|
42
|
-
return RequestClient.get<LastBlockItem<T>[]>(`${baseUrl(type)}/lastblock`);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function getThorchainQueue(type?: THORNodeType) {
|
|
46
|
-
return RequestClient.get(`${baseUrl(type)}/queue`);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function getNodes(type?: THORNodeType) {
|
|
50
|
-
return RequestClient.get<NodeItem[]>(`${baseUrl(type)}/nodes`);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function getMimirInfo(type?: THORNodeType) {
|
|
54
|
-
return RequestClient.get<MimirData>(`${baseUrl(type)}/mimir`);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function getInboundAddresses(type?: THORNodeType) {
|
|
58
|
-
return RequestClient.get<InboundAddressesItem[]>(`${baseUrl(type)}/inbound_addresses`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export async function getTHORNodeTNSDetails({
|
|
62
|
-
type,
|
|
63
|
-
name,
|
|
64
|
-
}: { type?: THORNodeType; name: string }): Promise<THORNodeTNSDetails> {
|
|
65
|
-
try {
|
|
66
|
-
const result = await RequestClient.get<THORNodeTNSDetails>(
|
|
67
|
-
`${getNameServiceBaseUrl(type)}/${name}`,
|
|
68
|
-
);
|
|
69
|
-
return result;
|
|
70
|
-
} catch (_error) {
|
|
71
|
-
// If we get an error, the name doesn't exist and is available for registration
|
|
72
|
-
return {
|
|
73
|
-
name,
|
|
74
|
-
expire_block_height: 0,
|
|
75
|
-
owner: "",
|
|
76
|
-
preferred_asset: "",
|
|
77
|
-
affiliate_collector_rune: "",
|
|
78
|
-
aliases: [],
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export async function getTNSPreferredAsset({ type, tns }: { type?: THORNodeType; tns: string }) {
|
|
84
|
-
const tnsDetails = await getTHORNodeTNSDetails({ name: tns, type });
|
|
85
|
-
|
|
86
|
-
if (!tnsDetails.preferred_asset || tnsDetails.preferred_asset === ".") return undefined;
|
|
87
|
-
|
|
88
|
-
return AssetValue.from({ asyncTokenLookup: true, asset: tnsDetails.preferred_asset });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export function getRunePoolInfo(type?: THORNodeType) {
|
|
92
|
-
return RequestClient.get<RunePoolInfo>(`${baseUrl(type)}/runepool`);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function getRunePoolProviderInfo({
|
|
96
|
-
type,
|
|
97
|
-
thorAddress,
|
|
98
|
-
}: { type?: THORNodeType; thorAddress: string }) {
|
|
99
|
-
return RequestClient.get<RunePoolProviderInfo>(`${baseUrl(type)}/rune_provider/${thorAddress}`);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function getTcyStaker({ type, address }: { type?: THORNodeType; address: string }) {
|
|
103
|
-
return RequestClient.get<TCYStakerResponse>(`${baseUrl(type)}/tcy_staker/${address}`);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function getTcyStakers(type?: THORNodeType) {
|
|
107
|
-
return RequestClient.get<TCYStakersResponse>(`${baseUrl(type)}/tcy_stakers`);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function getTcyClaimer({ type, address }: { type?: THORNodeType; address: string }) {
|
|
111
|
-
return RequestClient.get<TCYClaimerResponse>(`${baseUrl(type)}/tcy_claimer/${address}`);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function getTcyClaimers(type?: THORNodeType) {
|
|
115
|
-
return RequestClient.get<TCYClaimersResponse>(`${baseUrl(type)}/tcy_claimers`);
|
|
116
|
-
}
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
export type THORNodeType = "thorchain" | "mayachain";
|
|
2
|
-
|
|
3
|
-
export type THORNodeTNSDetails = {
|
|
4
|
-
name: string;
|
|
5
|
-
expire_block_height: number;
|
|
6
|
-
owner: string;
|
|
7
|
-
preferred_asset: string;
|
|
8
|
-
affiliate_collector_rune: string;
|
|
9
|
-
aliases: {
|
|
10
|
-
chain: string;
|
|
11
|
-
address: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type InboundAddressesItem = {
|
|
16
|
-
address: string;
|
|
17
|
-
chain: string;
|
|
18
|
-
gas_rate?: string;
|
|
19
|
-
halted: boolean;
|
|
20
|
-
pub_key: string;
|
|
21
|
-
router?: string;
|
|
22
|
-
global_trading_paused: boolean;
|
|
23
|
-
chain_trading_paused: boolean;
|
|
24
|
-
chain_lp_actions_paused: boolean;
|
|
25
|
-
observed_fee_rate?: string;
|
|
26
|
-
gas_rate_units: string;
|
|
27
|
-
outbound_tx_size: string;
|
|
28
|
-
outbound_fee: string;
|
|
29
|
-
dust_threshold: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type LastBlockItem<T extends THORNodeType = "thorchain"> = {
|
|
33
|
-
chain: string;
|
|
34
|
-
last_observed_in: number;
|
|
35
|
-
last_signed_out: number;
|
|
36
|
-
} & {
|
|
37
|
-
[K in T]: number;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type NodeItem = {
|
|
41
|
-
active_block_height: number;
|
|
42
|
-
bond_address: string;
|
|
43
|
-
current_award: string;
|
|
44
|
-
forced_to_leave: boolean;
|
|
45
|
-
ip_address: string;
|
|
46
|
-
leave_height: number;
|
|
47
|
-
node_address: string;
|
|
48
|
-
requested_to_leave: boolean;
|
|
49
|
-
signer_membership: string[];
|
|
50
|
-
slash_points: number;
|
|
51
|
-
status: string;
|
|
52
|
-
status_since: number;
|
|
53
|
-
total_bond: string;
|
|
54
|
-
validator_cons_pub_key: string;
|
|
55
|
-
version: string;
|
|
56
|
-
jail: any;
|
|
57
|
-
preflight_status: any;
|
|
58
|
-
pub_key_set: any;
|
|
59
|
-
observe_chains: {
|
|
60
|
-
chain: string;
|
|
61
|
-
height: number;
|
|
62
|
-
}[];
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export type MimirData = {
|
|
66
|
-
ADR012: number;
|
|
67
|
-
ASGARDSIZE: number;
|
|
68
|
-
BADVALIDATORREDLINE: number;
|
|
69
|
-
BURNSYNTHS: number;
|
|
70
|
-
CHURNINTERVAL: number;
|
|
71
|
-
CLOUTLIMIT: number;
|
|
72
|
-
CONFMULTIPLIERBASISPOINTS: number;
|
|
73
|
-
DEPRECATEILP: number;
|
|
74
|
-
DERIVEDDEPTHBASISPTS: number;
|
|
75
|
-
DERIVEDMINDEPTH: number;
|
|
76
|
-
DESIREDVALIDATORSET: number;
|
|
77
|
-
DYNAMICMAXANCHORTARGET: number;
|
|
78
|
-
EMISSIONCURVE: number;
|
|
79
|
-
ENABLEAVAXCHAIN: number;
|
|
80
|
-
ENABLEBSC: number;
|
|
81
|
-
ENABLESAVINGSVAULTS: number;
|
|
82
|
-
FULLIMPLOSSPROTECTIONBLOCKS: number;
|
|
83
|
-
FUNDMIGRATIONINTERVAL: number;
|
|
84
|
-
HALTAVAXCHAIN: number;
|
|
85
|
-
HALTAVAXTRADING: number;
|
|
86
|
-
HALTBCHCHAIN: number;
|
|
87
|
-
HALTBCHTRADING: number;
|
|
88
|
-
HALTBSCCHAIN: number;
|
|
89
|
-
HALTBSCTRADING: number;
|
|
90
|
-
HALTBTCCHAIN: number;
|
|
91
|
-
HALTBTCTRADING: number;
|
|
92
|
-
HALTCHAINGLOBAL: number;
|
|
93
|
-
HALTCHURNING: number;
|
|
94
|
-
HALTDOGECHAIN: number;
|
|
95
|
-
HALTDOGETRADING: number;
|
|
96
|
-
HALTETHCHAIN: number;
|
|
97
|
-
HALTETHTRADING: number;
|
|
98
|
-
HALTGAIACHAIN: number;
|
|
99
|
-
HALTGAIATRADING: number;
|
|
100
|
-
HALTLTCCHAIN: number;
|
|
101
|
-
HALTLTCTRADING: number;
|
|
102
|
-
HALTSIGNING: number;
|
|
103
|
-
HALTSIGNINGAVAX: number;
|
|
104
|
-
HALTSIGNINGBCH: number;
|
|
105
|
-
HALTSIGNINGBSC: number;
|
|
106
|
-
HALTSIGNINGBTC: number;
|
|
107
|
-
HALTSIGNINGDOGE: number;
|
|
108
|
-
HALTSIGNINGETH: number;
|
|
109
|
-
HALTSIGNINGGAIA: number;
|
|
110
|
-
HALTSIGNINGLTC: number;
|
|
111
|
-
HALTSIGNINGTERRA: number;
|
|
112
|
-
HALTTERRACHAIN: number;
|
|
113
|
-
HALTTERRATRADING: number;
|
|
114
|
-
HALTTHORCHAIN: number;
|
|
115
|
-
HALTTRADING: number;
|
|
116
|
-
ILPCUTOFF: number;
|
|
117
|
-
KEYGENRETRYINTERVAL: number;
|
|
118
|
-
KILLSWITCHSTART: number;
|
|
119
|
-
"LENDING-THOR-BTC": number;
|
|
120
|
-
"LENDING-THOR-ETH": number;
|
|
121
|
-
LENDINGLEVER: number;
|
|
122
|
-
LOANREPAYMENTMATURITY: number;
|
|
123
|
-
LOANSTREAMINGSWAPSINTERVAL: number;
|
|
124
|
-
MAXANCHORBLOCKS: number;
|
|
125
|
-
MAXANCHORSLIP: number;
|
|
126
|
-
MAXBONDPROVIDERS: number;
|
|
127
|
-
MAXCONFIRMATIONS: number;
|
|
128
|
-
MAXCR: number;
|
|
129
|
-
MAXIMUMLIQUIDITYRUNE: number;
|
|
130
|
-
MAXNODETOCHURNOUTFORLOWVERSION: number;
|
|
131
|
-
MAXOUTBOUNDATTEMPTS: number;
|
|
132
|
-
MAXOUTBOUNDFEEMULTIPLIERBASISPOINTS: number;
|
|
133
|
-
MAXRUNESUPPLY: number;
|
|
134
|
-
MAXSYNTHPERPOOLDEPTH: number;
|
|
135
|
-
MAXSYNTHSFORSAVERSYIELD: number;
|
|
136
|
-
MAXUTXOSTOSPEND: number;
|
|
137
|
-
MINCR: number;
|
|
138
|
-
MINIMUMBONDINRUNE: number;
|
|
139
|
-
MINIMUML1OUTBOUNDFEEUSD: number;
|
|
140
|
-
MINOUTBOUNDFEEMULTIPLIERBASISPOINTS: number;
|
|
141
|
-
MINRUNEPOOLDEPTH: number;
|
|
142
|
-
MINTSYNTHS: number;
|
|
143
|
-
NODEOPERATORFEE: number;
|
|
144
|
-
NODEPAUSECHAINGLOBAL: number;
|
|
145
|
-
NUMBEROFNEWNODESPERCHURN: number;
|
|
146
|
-
OBSERVATIONDELAYFLEXIBILITY: number;
|
|
147
|
-
"PAUSEASYMWITHDRAWAL-TERRA": number;
|
|
148
|
-
PAUSELOANS: number;
|
|
149
|
-
PAUSELP: number;
|
|
150
|
-
PAUSELPAVAX: number;
|
|
151
|
-
PAUSELPBCH: number;
|
|
152
|
-
PAUSELPBSC: number;
|
|
153
|
-
PAUSELPBTC: number;
|
|
154
|
-
PAUSELPDOGE: number;
|
|
155
|
-
PAUSELPETH: number;
|
|
156
|
-
PAUSELPGAIA: number;
|
|
157
|
-
PAUSELPLTC: number;
|
|
158
|
-
PAUSELPTERRA: number;
|
|
159
|
-
PAUSEUNBOND: number;
|
|
160
|
-
PENDINGLIQUIDITYAGELIMIT: number;
|
|
161
|
-
"POL-AVAX-AVAX": number;
|
|
162
|
-
"POL-AVAX-USDC-0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E": number;
|
|
163
|
-
"POL-BCH-BCH": number;
|
|
164
|
-
"POL-BSC-USDC-0X8AC76A51CC950D9822D68B83FE1AD97B32CD580D": number;
|
|
165
|
-
"POL-BTC-BTC": number;
|
|
166
|
-
"POL-DOGE-DOGE": number;
|
|
167
|
-
"POL-ETH-DAI-0X6B175474E89094C44DA98B954EEDEAC495271D0F": number;
|
|
168
|
-
"POL-ETH-ETH": number;
|
|
169
|
-
"POL-ETH-USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48": number;
|
|
170
|
-
"POL-ETH-USDT-0XDAC17F958D2EE523A2206206994597C13D831EC7": number;
|
|
171
|
-
"POL-GAIA-ATOM": number;
|
|
172
|
-
"POL-LTC-LTC": number;
|
|
173
|
-
POLBUFFER: number;
|
|
174
|
-
POLMAXNETWORKDEPOSIT: number;
|
|
175
|
-
POLMAXPOOLMOVEMENT: number;
|
|
176
|
-
POLTARGETSYNTHPERPOOLDEPTH: number;
|
|
177
|
-
POOLCYCLE: number;
|
|
178
|
-
POOLDEPTHFORYGGFUNDINGMIN: number;
|
|
179
|
-
PREFERREDASSETOUTBOUNDFEEMULTIPLIER: number;
|
|
180
|
-
RESCHEDULECOALESCEBLOCKS: number;
|
|
181
|
-
SAVERSSTREAMINGSWAPSINTERVAL: number;
|
|
182
|
-
SIGNERCONCURRENCY: number;
|
|
183
|
-
SLASHPENALTY: number;
|
|
184
|
-
SOLVENCYHALTAVAXCHAIN: number;
|
|
185
|
-
SOLVENCYHALTBCHCHAIN: number;
|
|
186
|
-
SOLVENCYHALTBSCCHAIN: number;
|
|
187
|
-
SOLVENCYHALTDOGECHAIN: number;
|
|
188
|
-
SOLVENCYHALTETHCHAIN: number;
|
|
189
|
-
SOLVENCYHALTGAIACHAIN: number;
|
|
190
|
-
SOLVENCYHALTTERRACHAIN: number;
|
|
191
|
-
STOPFUNDYGGDRASIL: number;
|
|
192
|
-
STOPSOLVENCYCHECK: number;
|
|
193
|
-
STOPSOLVENCYCHECKAVAX: number;
|
|
194
|
-
STOPSOLVENCYCHECKBSC: number;
|
|
195
|
-
STOPSOLVENCYCHECKDOGE: number;
|
|
196
|
-
STOPSOLVENCYCHECKETH: number;
|
|
197
|
-
STOPSOLVENCYCHECKGAIA: number;
|
|
198
|
-
STOPSOLVENCYCHECKTERRA: number;
|
|
199
|
-
STREAMINGSWAPMINBPFEE: number;
|
|
200
|
-
SYNTHYIELDBASISPOINTS: number;
|
|
201
|
-
THORNAMES: number;
|
|
202
|
-
"TORANCHOR-AVAX-USDC-0XB97EF9EF8734C71904D8002F8B6BC66DD9C48A6E": number;
|
|
203
|
-
"TORANCHOR-AVAX-USDT-0X9702230A8EA53601F5CD2DC00FDBC13D4DF4A8C7": number;
|
|
204
|
-
"TORANCHOR-BSC-USDC-0X8AC76A51CC950D9822D68B83FE1AD97B32CD580D": number;
|
|
205
|
-
"TORANCHOR-ETH-DAI-0X6B175474E89094C44DA98B954EEDEAC495271D0F": number;
|
|
206
|
-
"TORANCHOR-ETH-USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48": number;
|
|
207
|
-
"TORANCHOR-ETH-USDT-0XDAC17F958D2EE523A2206206994597C13D831EC7": number;
|
|
208
|
-
TXOUTDELAYRATE: number;
|
|
209
|
-
VIRTUALMULTSYNTHS: number;
|
|
210
|
-
VOTEDOFM: number;
|
|
211
|
-
VOTELENDING: number;
|
|
212
|
-
VOTEMAXSYNTHSFORSAVERSYIELD: number;
|
|
213
|
-
YGGFUNDLIMIT: number;
|
|
214
|
-
YGGFUNDRETRY: number;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
export type RunePoolInfo = {
|
|
218
|
-
pol: {
|
|
219
|
-
rune_deposited: string;
|
|
220
|
-
rune_withdrawn: string;
|
|
221
|
-
value: string;
|
|
222
|
-
pnl: string;
|
|
223
|
-
current_deposit: string;
|
|
224
|
-
};
|
|
225
|
-
providers: {
|
|
226
|
-
units: string;
|
|
227
|
-
pending_units: string;
|
|
228
|
-
pending_rune: string;
|
|
229
|
-
value: string;
|
|
230
|
-
pnl: string;
|
|
231
|
-
current_deposit: string;
|
|
232
|
-
};
|
|
233
|
-
reserve: {
|
|
234
|
-
units: string;
|
|
235
|
-
value: string;
|
|
236
|
-
pnl: string;
|
|
237
|
-
current_deposit: string;
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export type RunePoolProviderInfo = {
|
|
242
|
-
rune_address: string;
|
|
243
|
-
units: string;
|
|
244
|
-
value: string;
|
|
245
|
-
pnl: string;
|
|
246
|
-
deposit_amount: string;
|
|
247
|
-
withdraw_amount: string;
|
|
248
|
-
last_deposit_height: number;
|
|
249
|
-
last_withdraw_height: number;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export type TCYStakerSummary = {
|
|
253
|
-
amount: string;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export type TCYStaker = {
|
|
257
|
-
address?: string;
|
|
258
|
-
amount: string;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export type TCYStakerResponse = TCYStaker;
|
|
262
|
-
export type TCYStakersResponse = TCYStakerSummary[];
|
|
263
|
-
|
|
264
|
-
export type TCYClaimerSummary = {
|
|
265
|
-
amount: string;
|
|
266
|
-
asset: string;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export type TCYClaimer = {
|
|
270
|
-
l1_address?: string;
|
|
271
|
-
amount: string;
|
|
272
|
-
asset: string;
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
export type TCYClaimerResponse = TCYClaimer;
|
|
276
|
-
export type TCYClaimersResponse = TCYClaimerSummary[];
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AssetValue,
|
|
3
|
-
Chain,
|
|
4
|
-
type ProviderName,
|
|
5
|
-
RequestClient,
|
|
6
|
-
getChainIdentifier,
|
|
7
|
-
} from "@swapkit/helpers";
|
|
8
|
-
|
|
9
|
-
import { getTokenListProviders } from "../swapkitApi/endpoints";
|
|
10
|
-
import type { TokenListProvidersResponse } from "../swapkitApi/types";
|
|
11
|
-
import type { TokensResponse } from "./types";
|
|
12
|
-
|
|
13
|
-
const baseUrl = "https://static.thorswap.net";
|
|
14
|
-
|
|
15
|
-
export function getStaticTokenList(tokenListName: string) {
|
|
16
|
-
return RequestClient.get<TokensResponse>(`${baseUrl}/token-list/${tokenListName}.json`);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function getLogoForAsset(assetString: string) {
|
|
20
|
-
const mappedAssetIcon = getMappedAssetIcon(assetString);
|
|
21
|
-
|
|
22
|
-
return `${baseUrl}/token-list/images/${mappedAssetIcon}.png`;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function getChainLogoForAsset(assetString: string) {
|
|
26
|
-
const { chain } = AssetValue.from({ asset: assetString });
|
|
27
|
-
const chainIdentifier = getChainIdentifier(chain).toLowerCase();
|
|
28
|
-
|
|
29
|
-
return `${baseUrl}/token-list/images/${chainIdentifier}.png`;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let providerData: TokenListProvidersResponse;
|
|
33
|
-
|
|
34
|
-
export async function getProviderLogo(providerName: ProviderName | string) {
|
|
35
|
-
providerData ||= await getTokenListProviders();
|
|
36
|
-
|
|
37
|
-
return providerData.find((p) => p.name === providerName)?.url;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function getMappedAssetIcon(assetString: string) {
|
|
41
|
-
const { symbol } = AssetValue.from({ asset: assetString });
|
|
42
|
-
|
|
43
|
-
if (symbol === Chain.Ethereum) return "eth.eth";
|
|
44
|
-
|
|
45
|
-
return assetString.toLowerCase();
|
|
46
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type Token = {
|
|
2
|
-
address?: string;
|
|
3
|
-
chain: string;
|
|
4
|
-
chainId: string;
|
|
5
|
-
decimals?: number;
|
|
6
|
-
identifier: string;
|
|
7
|
-
logoURL?: string;
|
|
8
|
-
ticker: string;
|
|
9
|
-
tokenlist: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type TokensResponse = {
|
|
13
|
-
keywords: string[];
|
|
14
|
-
name: string;
|
|
15
|
-
timestamp: string;
|
|
16
|
-
version: { major: number; minor: number; patch: number };
|
|
17
|
-
tokens: Token[];
|
|
18
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export const avaxGeneric = [
|
|
2
|
-
{
|
|
3
|
-
inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
|
|
4
|
-
stateMutability: "nonpayable",
|
|
5
|
-
type: "constructor",
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
anonymous: false,
|
|
9
|
-
inputs: [
|
|
10
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
11
|
-
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
12
|
-
],
|
|
13
|
-
name: "FeeSet",
|
|
14
|
-
type: "event",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
anonymous: false,
|
|
18
|
-
inputs: [
|
|
19
|
-
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
20
|
-
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
21
|
-
],
|
|
22
|
-
name: "OwnerSet",
|
|
23
|
-
type: "event",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
inputs: [],
|
|
27
|
-
name: "fee",
|
|
28
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
29
|
-
stateMutability: "view",
|
|
30
|
-
type: "function",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
inputs: [],
|
|
34
|
-
name: "feeRecipient",
|
|
35
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
36
|
-
stateMutability: "view",
|
|
37
|
-
type: "function",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
41
|
-
name: "owners",
|
|
42
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
43
|
-
stateMutability: "view",
|
|
44
|
-
type: "function",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
inputs: [
|
|
48
|
-
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
49
|
-
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
50
|
-
],
|
|
51
|
-
name: "setFee",
|
|
52
|
-
outputs: [],
|
|
53
|
-
stateMutability: "nonpayable",
|
|
54
|
-
type: "function",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
inputs: [
|
|
58
|
-
{ internalType: "address", name: "owner", type: "address" },
|
|
59
|
-
{ internalType: "bool", name: "active", type: "bool" },
|
|
60
|
-
],
|
|
61
|
-
name: "setOwner",
|
|
62
|
-
outputs: [],
|
|
63
|
-
stateMutability: "nonpayable",
|
|
64
|
-
type: "function",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
inputs: [
|
|
68
|
-
{ internalType: "address", name: "tcRouter", type: "address" },
|
|
69
|
-
{ internalType: "address", name: "tcVault", type: "address" },
|
|
70
|
-
{ internalType: "string", name: "tcMemo", type: "string" },
|
|
71
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
72
|
-
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
73
|
-
{ internalType: "address", name: "router", type: "address" },
|
|
74
|
-
{ internalType: "bytes", name: "data", type: "bytes" },
|
|
75
|
-
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
76
|
-
],
|
|
77
|
-
name: "swapIn",
|
|
78
|
-
outputs: [],
|
|
79
|
-
stateMutability: "nonpayable",
|
|
80
|
-
type: "function",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
inputs: [],
|
|
84
|
-
name: "tokenTransferProxy",
|
|
85
|
-
outputs: [
|
|
86
|
-
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
87
|
-
],
|
|
88
|
-
stateMutability: "view",
|
|
89
|
-
type: "function",
|
|
90
|
-
},
|
|
91
|
-
{ stateMutability: "payable", type: "receive" },
|
|
92
|
-
];
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
export const avaxWoofi = [
|
|
2
|
-
{
|
|
3
|
-
inputs: [
|
|
4
|
-
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
-
{ internalType: "address", name: "_weth", type: "address" },
|
|
6
|
-
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
|
-
],
|
|
8
|
-
stateMutability: "nonpayable",
|
|
9
|
-
type: "constructor",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
anonymous: false,
|
|
13
|
-
inputs: [
|
|
14
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
15
|
-
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
16
|
-
],
|
|
17
|
-
name: "FeeSet",
|
|
18
|
-
type: "event",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
anonymous: false,
|
|
22
|
-
inputs: [
|
|
23
|
-
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
24
|
-
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
25
|
-
],
|
|
26
|
-
name: "OwnerSet",
|
|
27
|
-
type: "event",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
anonymous: false,
|
|
31
|
-
inputs: [
|
|
32
|
-
{ indexed: false, internalType: "address", name: "from", type: "address" },
|
|
33
|
-
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
34
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
35
|
-
{ indexed: false, internalType: "uint256", name: "out", type: "uint256" },
|
|
36
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
37
|
-
{ indexed: false, internalType: "address", name: "vault", type: "address" },
|
|
38
|
-
{ indexed: false, internalType: "string", name: "memo", type: "string" },
|
|
39
|
-
],
|
|
40
|
-
name: "SwapIn",
|
|
41
|
-
type: "event",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
anonymous: false,
|
|
45
|
-
inputs: [
|
|
46
|
-
{ indexed: false, internalType: "address", name: "to", type: "address" },
|
|
47
|
-
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
48
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
49
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
50
|
-
],
|
|
51
|
-
name: "SwapOut",
|
|
52
|
-
type: "event",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
inputs: [],
|
|
56
|
-
name: "fee",
|
|
57
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
58
|
-
stateMutability: "view",
|
|
59
|
-
type: "function",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
inputs: [],
|
|
63
|
-
name: "feeRecipient",
|
|
64
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
65
|
-
stateMutability: "view",
|
|
66
|
-
type: "function",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
70
|
-
name: "owners",
|
|
71
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
72
|
-
stateMutability: "view",
|
|
73
|
-
type: "function",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
inputs: [
|
|
77
|
-
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
78
|
-
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
79
|
-
],
|
|
80
|
-
name: "setFee",
|
|
81
|
-
outputs: [],
|
|
82
|
-
stateMutability: "nonpayable",
|
|
83
|
-
type: "function",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
inputs: [
|
|
87
|
-
{ internalType: "address", name: "owner", type: "address" },
|
|
88
|
-
{ internalType: "bool", name: "active", type: "bool" },
|
|
89
|
-
],
|
|
90
|
-
name: "setOwner",
|
|
91
|
-
outputs: [],
|
|
92
|
-
stateMutability: "nonpayable",
|
|
93
|
-
type: "function",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
inputs: [
|
|
97
|
-
{ internalType: "address", name: "router", type: "address" },
|
|
98
|
-
{ internalType: "address", name: "vault", type: "address" },
|
|
99
|
-
{ internalType: "string", name: "memo", type: "string" },
|
|
100
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
101
|
-
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
102
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
103
|
-
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
104
|
-
],
|
|
105
|
-
name: "swapIn",
|
|
106
|
-
outputs: [],
|
|
107
|
-
stateMutability: "nonpayable",
|
|
108
|
-
type: "function",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
inputs: [
|
|
112
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
113
|
-
{ internalType: "address", name: "to", type: "address" },
|
|
114
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
115
|
-
],
|
|
116
|
-
name: "swapOut",
|
|
117
|
-
outputs: [],
|
|
118
|
-
stateMutability: "payable",
|
|
119
|
-
type: "function",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
inputs: [],
|
|
123
|
-
name: "swapRouter",
|
|
124
|
-
outputs: [{ internalType: "contract IWoofi", name: "", type: "address" }],
|
|
125
|
-
stateMutability: "view",
|
|
126
|
-
type: "function",
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
inputs: [],
|
|
130
|
-
name: "tokenTransferProxy",
|
|
131
|
-
outputs: [
|
|
132
|
-
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
133
|
-
],
|
|
134
|
-
stateMutability: "view",
|
|
135
|
-
type: "function",
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
inputs: [],
|
|
139
|
-
name: "weth",
|
|
140
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
141
|
-
stateMutability: "view",
|
|
142
|
-
type: "function",
|
|
143
|
-
},
|
|
144
|
-
{ stateMutability: "payable", type: "receive" },
|
|
145
|
-
];
|