@1inch/swap-vm-sdk 0.1.0
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/LICENSE +103 -0
- package/README.md +584 -0
- package/dist/abi/SwapVM.abi.d.mts +403 -0
- package/dist/abi/SwapVM.abi.d.ts +403 -0
- package/dist/abi/index.d.mts +1 -0
- package/dist/abi/index.d.ts +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3842 -0
- package/dist/index.mjs +3777 -0
- package/dist/swap-vm/index.d.mts +6 -0
- package/dist/swap-vm/index.d.ts +6 -0
- package/dist/swap-vm/instructions/balances/balances-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/balances/balances-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/balances/balances-args.d.mts +17 -0
- package/dist/swap-vm/instructions/balances/balances-args.d.ts +17 -0
- package/dist/swap-vm/instructions/balances/index.d.mts +3 -0
- package/dist/swap-vm/instructions/balances/index.d.ts +3 -0
- package/dist/swap-vm/instructions/balances/opcodes.d.mts +12 -0
- package/dist/swap-vm/instructions/balances/opcodes.d.ts +12 -0
- package/dist/swap-vm/instructions/balances/types.d.mts +5 -0
- package/dist/swap-vm/instructions/balances/types.d.ts +5 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.mts +40 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.ts +40 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/index.d.mts +2 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/index.d.ts +2 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.mts +21 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.ts +21 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.mts +17 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.ts +17 -0
- package/dist/swap-vm/instructions/concentrate/index.d.mts +5 -0
- package/dist/swap-vm/instructions/concentrate/index.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/concentrate/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/concentrate/types.d.mts +5 -0
- package/dist/swap-vm/instructions/concentrate/types.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/utils.d.mts +4 -0
- package/dist/swap-vm/instructions/concentrate/utils.d.ts +4 -0
- package/dist/swap-vm/instructions/controls/deadline-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/deadline-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/deadline-args.d.mts +9 -0
- package/dist/swap-vm/instructions/controls/deadline-args.d.ts +9 -0
- package/dist/swap-vm/instructions/controls/index.d.mts +8 -0
- package/dist/swap-vm/instructions/controls/index.d.ts +8 -0
- package/dist/swap-vm/instructions/controls/jump-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/jump-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/jump-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/jump-args.d.ts +16 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args.d.mts +10 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args.d.ts +10 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.mts +17 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.ts +17 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.ts +16 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.mts +18 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.ts +18 -0
- package/dist/swap-vm/instructions/controls/opcodes.d.mts +36 -0
- package/dist/swap-vm/instructions/controls/opcodes.d.ts +36 -0
- package/dist/swap-vm/instructions/controls/salt-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/salt-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/salt-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/salt-args.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/debug-args.d.mts +8 -0
- package/dist/swap-vm/instructions/debug/debug-args.d.ts +8 -0
- package/dist/swap-vm/instructions/debug/debug-empty-args.d.mts +19 -0
- package/dist/swap-vm/instructions/debug/debug-empty-args.d.ts +19 -0
- package/dist/swap-vm/instructions/debug/opcodes.d.mts +18 -0
- package/dist/swap-vm/instructions/debug/opcodes.d.ts +18 -0
- package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-context.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-context.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-gas-left.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-gas-left.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-query.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-query.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-registers.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-registers.d.ts +16 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args.d.mts +16 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args.d.ts +16 -0
- package/dist/swap-vm/instructions/decay/index.d.mts +2 -0
- package/dist/swap-vm/instructions/decay/index.d.ts +2 -0
- package/dist/swap-vm/instructions/decay/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/decay/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.mts +44 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.ts +44 -0
- package/dist/swap-vm/instructions/dutch-auction/index.d.mts +2 -0
- package/dist/swap-vm/instructions/dutch-auction/index.d.ts +2 -0
- package/dist/swap-vm/instructions/dutch-auction/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/dutch-auction/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/empty.d.mts +13 -0
- package/dist/swap-vm/instructions/empty.d.ts +13 -0
- package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/extruction/extruction-args.d.mts +21 -0
- package/dist/swap-vm/instructions/extruction/extruction-args.d.ts +21 -0
- package/dist/swap-vm/instructions/extruction/index.d.mts +2 -0
- package/dist/swap-vm/instructions/extruction/index.d.ts +2 -0
- package/dist/swap-vm/instructions/extruction/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/extruction/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args.d.mts +28 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args.d.ts +28 -0
- package/dist/swap-vm/instructions/fee/index.d.mts +3 -0
- package/dist/swap-vm/instructions/fee/index.d.ts +3 -0
- package/dist/swap-vm/instructions/fee/opcodes.d.mts +30 -0
- package/dist/swap-vm/instructions/fee/opcodes.d.ts +30 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args.d.mts +35 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args.d.ts +35 -0
- package/dist/swap-vm/instructions/index.d.mts +29 -0
- package/dist/swap-vm/instructions/index.d.ts +29 -0
- package/dist/swap-vm/instructions/instruction.d.mts +7 -0
- package/dist/swap-vm/instructions/instruction.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/index.d.mts +4 -0
- package/dist/swap-vm/instructions/invalidators/index.d.ts +4 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.mts +16 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.ts +16 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.mts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.ts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.mts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.ts +8 -0
- package/dist/swap-vm/instructions/invalidators/opcodes.d.mts +15 -0
- package/dist/swap-vm/instructions/invalidators/opcodes.d.ts +15 -0
- package/dist/swap-vm/instructions/limit-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/limit-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.mts +24 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.ts +24 -0
- package/dist/swap-vm/instructions/limit-swap/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/limit-swap/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/min-rate/index.d.mts +2 -0
- package/dist/swap-vm/instructions/min-rate/index.d.ts +2 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args.d.mts +22 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args.d.ts +22 -0
- package/dist/swap-vm/instructions/min-rate/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/min-rate/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/opcode.d.mts +8 -0
- package/dist/swap-vm/instructions/opcode.d.ts +8 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.mts +2 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.ts +2 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.mts +41 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.ts +41 -0
- package/dist/swap-vm/instructions/stable-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/stable-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/stable-swap/opcodes.d.mts +4 -0
- package/dist/swap-vm/instructions/stable-swap/opcodes.d.ts +4 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.mts +25 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.ts +25 -0
- package/dist/swap-vm/instructions/twap-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/twap-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/twap-swap/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/twap-swap/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.mts +71 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.ts +71 -0
- package/dist/swap-vm/instructions/types.d.mts +18 -0
- package/dist/swap-vm/instructions/types.d.ts +18 -0
- package/dist/swap-vm/instructions/xyc-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/xyc-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/xyc-swap/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/xyc-swap/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.mts +15 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.ts +15 -0
- package/dist/swap-vm/maker-traits.d.mts +206 -0
- package/dist/swap-vm/maker-traits.d.ts +206 -0
- package/dist/swap-vm/order.d.mts +84 -0
- package/dist/swap-vm/order.d.ts +84 -0
- package/dist/swap-vm/programs/aqua-program-builder.d.mts +118 -0
- package/dist/swap-vm/programs/aqua-program-builder.d.ts +118 -0
- package/dist/swap-vm/programs/index.d.mts +4 -0
- package/dist/swap-vm/programs/index.d.ts +4 -0
- package/dist/swap-vm/programs/program-builder.d.mts +26 -0
- package/dist/swap-vm/programs/program-builder.d.ts +26 -0
- package/dist/swap-vm/programs/regular-program-builder.d.mts +187 -0
- package/dist/swap-vm/programs/regular-program-builder.d.ts +187 -0
- package/dist/swap-vm/programs/swap-vm-program.d.mts +6 -0
- package/dist/swap-vm/programs/swap-vm-program.d.ts +6 -0
- package/dist/swap-vm/strategies/aqua-amm-strategy.d.mts +32 -0
- package/dist/swap-vm/strategies/aqua-amm-strategy.d.ts +32 -0
- package/dist/swap-vm/strategies/index.d.mts +1 -0
- package/dist/swap-vm/strategies/index.d.ts +1 -0
- package/dist/swap-vm/taker-traits.d.mts +214 -0
- package/dist/swap-vm/taker-traits.d.ts +214 -0
- package/dist/swap-vm/types.d.mts +22 -0
- package/dist/swap-vm/types.d.ts +22 -0
- package/dist/swap-vm-contract/constants.d.mts +13 -0
- package/dist/swap-vm-contract/constants.d.ts +13 -0
- package/dist/swap-vm-contract/events/index.d.mts +1 -0
- package/dist/swap-vm-contract/events/index.d.ts +1 -0
- package/dist/swap-vm-contract/events/swapped-event.d.mts +19 -0
- package/dist/swap-vm-contract/events/swapped-event.d.ts +19 -0
- package/dist/swap-vm-contract/index.d.mts +4 -0
- package/dist/swap-vm-contract/index.d.ts +4 -0
- package/dist/swap-vm-contract/swap-vm-contract.d.mts +38 -0
- package/dist/swap-vm-contract/swap-vm-contract.d.ts +38 -0
- package/dist/swap-vm-contract/types.d.mts +22 -0
- package/dist/swap-vm-contract/types.d.ts +22 -0
- package/package.json +72 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { BalancesArgs } from './balances-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class BalancesArgsCoder implements IArgsCoder<BalancesArgs> {
|
|
5
|
+
encode(args: BalancesArgs): HexString;
|
|
6
|
+
decode(data: HexString): BalancesArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { BalancesArgs } from './balances-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class BalancesArgsCoder implements IArgsCoder<BalancesArgs> {
|
|
5
|
+
encode(args: BalancesArgs): HexString;
|
|
6
|
+
decode(data: HexString): BalancesArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { TokenBalance } from './types';
|
|
3
|
+
import type { IArgsData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for setBalances and balances instructions containing token-amount pairs
|
|
6
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L10
|
|
7
|
+
**/
|
|
8
|
+
export declare class BalancesArgs implements IArgsData {
|
|
9
|
+
readonly tokenBalances: TokenBalance[];
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(tokenBalances: TokenBalance[]);
|
|
12
|
+
/**
|
|
13
|
+
* Decodes hex data into BalancesArgs instance
|
|
14
|
+
**/
|
|
15
|
+
static decode(data: HexString): BalancesArgs;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { TokenBalance } from './types';
|
|
3
|
+
import type { IArgsData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for setBalances and balances instructions containing token-amount pairs
|
|
6
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L10
|
|
7
|
+
**/
|
|
8
|
+
export declare class BalancesArgs implements IArgsData {
|
|
9
|
+
readonly tokenBalances: TokenBalance[];
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(tokenBalances: TokenBalance[]);
|
|
12
|
+
/**
|
|
13
|
+
* Decodes hex data into BalancesArgs instance
|
|
14
|
+
**/
|
|
15
|
+
static decode(data: HexString): BalancesArgs;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BalancesArgs } from './balances-args';
|
|
2
|
+
import { Opcode } from '../opcode';
|
|
3
|
+
/**
|
|
4
|
+
* Sets initial token balances for the swap program
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L59
|
|
6
|
+
**/
|
|
7
|
+
export declare const staticBalancesXD: Opcode<BalancesArgs>;
|
|
8
|
+
/**
|
|
9
|
+
* Reads token balances from program data or contract storage
|
|
10
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L89
|
|
11
|
+
**/
|
|
12
|
+
export declare const dynamicBalancesXD: Opcode<BalancesArgs>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BalancesArgs } from './balances-args';
|
|
2
|
+
import { Opcode } from '../opcode';
|
|
3
|
+
/**
|
|
4
|
+
* Sets initial token balances for the swap program
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L59
|
|
6
|
+
**/
|
|
7
|
+
export declare const staticBalancesXD: Opcode<BalancesArgs>;
|
|
8
|
+
/**
|
|
9
|
+
* Reads token balances from program data or contract storage
|
|
10
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Balances.sol#L89
|
|
11
|
+
**/
|
|
12
|
+
export declare const dynamicBalancesXD: Opcode<BalancesArgs>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { BaseFeeAdjusterArgs } from './base-fee-adjuster-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class BaseFeeAdjusterArgsCoder implements IArgsCoder<BaseFeeAdjusterArgs> {
|
|
5
|
+
encode(args: BaseFeeAdjusterArgs): HexString;
|
|
6
|
+
decode(data: HexString): BaseFeeAdjusterArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { BaseFeeAdjusterArgs } from './base-fee-adjuster-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class BaseFeeAdjusterArgsCoder implements IArgsCoder<BaseFeeAdjusterArgs> {
|
|
5
|
+
encode(args: BaseFeeAdjusterArgs): HexString;
|
|
6
|
+
decode(data: HexString): BaseFeeAdjusterArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @notice Base Fee Gas Price Adjuster instruction for dynamic price adjustment based on network gas costs
|
|
5
|
+
* @dev Adjusts swap prices based on current gas conditions to compensate for transaction costs:
|
|
6
|
+
* - Works only for 1=>0 swaps (token1 to token0), compatible with LimitSwap and DutchAuction
|
|
7
|
+
* - When gas price exceeds base level, maker improves the price to compensate taker for gas costs
|
|
8
|
+
* - The adjustment is proportional to the difference between current and base gas prices
|
|
9
|
+
* - Maximum adjustment is limited by maxPriceDecay parameter
|
|
10
|
+
*
|
|
11
|
+
* This creates adaptive limit orders that automatically become more attractive during high gas periods,
|
|
12
|
+
* ensuring execution even when transaction costs are elevated.
|
|
13
|
+
*
|
|
14
|
+
* Example usage:
|
|
15
|
+
* 1. LimitSwap sets base price: 1 ETH for 3000 USDC
|
|
16
|
+
* 2. BaseFeeAdjuster with baseGasPrice=20 gwei, current=100 gwei
|
|
17
|
+
* 3. Extra cost = 80 gwei * 150k gas * 3000 USDC/ETH = 36 USDC
|
|
18
|
+
* 4. With maxPriceDecay=0.99e18 (1% max), final price: 1 ETH for 2970 USDC
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/BaseFeeAdjuster.sol#L75
|
|
21
|
+
*/
|
|
22
|
+
export declare class BaseFeeAdjusterArgs implements IArgsData {
|
|
23
|
+
readonly baseGasPrice: bigint;
|
|
24
|
+
readonly ethToToken1Price: bigint;
|
|
25
|
+
readonly gasAmount: bigint;
|
|
26
|
+
readonly maxPriceDecay: bigint;
|
|
27
|
+
static readonly CODER: any;
|
|
28
|
+
/**
|
|
29
|
+
* baseGasPrice - base gas price for comparison (uint64)
|
|
30
|
+
* ethToToken1Price - ETH price in token1 units, e.g.,
|
|
31
|
+
* 3000e18 for 1 ETH = 3000 USDC (uint96)
|
|
32
|
+
* gasAmount - gas amount to compensate for (uint24)
|
|
33
|
+
**/
|
|
34
|
+
constructor(baseGasPrice: bigint, ethToToken1Price: bigint, gasAmount: bigint, maxPriceDecay: bigint);
|
|
35
|
+
/**
|
|
36
|
+
* Decodes hex data into BaseFeeAdjusterArgs instance
|
|
37
|
+
**/
|
|
38
|
+
static decode(data: HexString): BaseFeeAdjusterArgs;
|
|
39
|
+
toJSON(): Record<string, unknown>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @notice Base Fee Gas Price Adjuster instruction for dynamic price adjustment based on network gas costs
|
|
5
|
+
* @dev Adjusts swap prices based on current gas conditions to compensate for transaction costs:
|
|
6
|
+
* - Works only for 1=>0 swaps (token1 to token0), compatible with LimitSwap and DutchAuction
|
|
7
|
+
* - When gas price exceeds base level, maker improves the price to compensate taker for gas costs
|
|
8
|
+
* - The adjustment is proportional to the difference between current and base gas prices
|
|
9
|
+
* - Maximum adjustment is limited by maxPriceDecay parameter
|
|
10
|
+
*
|
|
11
|
+
* This creates adaptive limit orders that automatically become more attractive during high gas periods,
|
|
12
|
+
* ensuring execution even when transaction costs are elevated.
|
|
13
|
+
*
|
|
14
|
+
* Example usage:
|
|
15
|
+
* 1. LimitSwap sets base price: 1 ETH for 3000 USDC
|
|
16
|
+
* 2. BaseFeeAdjuster with baseGasPrice=20 gwei, current=100 gwei
|
|
17
|
+
* 3. Extra cost = 80 gwei * 150k gas * 3000 USDC/ETH = 36 USDC
|
|
18
|
+
* 4. With maxPriceDecay=0.99e18 (1% max), final price: 1 ETH for 2970 USDC
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/BaseFeeAdjuster.sol#L75
|
|
21
|
+
*/
|
|
22
|
+
export declare class BaseFeeAdjusterArgs implements IArgsData {
|
|
23
|
+
readonly baseGasPrice: bigint;
|
|
24
|
+
readonly ethToToken1Price: bigint;
|
|
25
|
+
readonly gasAmount: bigint;
|
|
26
|
+
readonly maxPriceDecay: bigint;
|
|
27
|
+
static readonly CODER: any;
|
|
28
|
+
/**
|
|
29
|
+
* baseGasPrice - base gas price for comparison (uint64)
|
|
30
|
+
* ethToToken1Price - ETH price in token1 units, e.g.,
|
|
31
|
+
* 3000e18 for 1 ETH = 3000 USDC (uint96)
|
|
32
|
+
* gasAmount - gas amount to compensate for (uint24)
|
|
33
|
+
**/
|
|
34
|
+
constructor(baseGasPrice: bigint, ethToToken1Price: bigint, gasAmount: bigint, maxPriceDecay: bigint);
|
|
35
|
+
/**
|
|
36
|
+
* Decodes hex data into BaseFeeAdjusterArgs instance
|
|
37
|
+
**/
|
|
38
|
+
static decode(data: HexString): BaseFeeAdjusterArgs;
|
|
39
|
+
toJSON(): Record<string, unknown>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { ConcentrateGrowLiquidity2DArgs } from './concentrate-grow-liquidity-2d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class ConcentrateGrowLiquidity2DArgsCoder implements IArgsCoder<ConcentrateGrowLiquidity2DArgs> {
|
|
5
|
+
encode(args: ConcentrateGrowLiquidity2DArgs): HexString;
|
|
6
|
+
decode(data: HexString): ConcentrateGrowLiquidity2DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { ConcentrateGrowLiquidity2DArgs } from './concentrate-grow-liquidity-2d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class ConcentrateGrowLiquidity2DArgsCoder implements IArgsCoder<ConcentrateGrowLiquidity2DArgs> {
|
|
5
|
+
encode(args: ConcentrateGrowLiquidity2DArgs): HexString;
|
|
6
|
+
decode(data: HexString): ConcentrateGrowLiquidity2DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for concentrateGrowLiquidity2D instruction with two deltas
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L172
|
|
6
|
+
**/
|
|
7
|
+
export declare class ConcentrateGrowLiquidity2DArgs implements IArgsData {
|
|
8
|
+
readonly deltaLt: bigint;
|
|
9
|
+
readonly deltaGt: bigint;
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(deltaLt: bigint, deltaGt: bigint);
|
|
12
|
+
/**
|
|
13
|
+
* Helper to create args from token addresses and deltas (handles ordering)
|
|
14
|
+
**/
|
|
15
|
+
static fromTokenDeltas(tokenA: Address, tokenB: Address, deltaA: bigint, deltaB: bigint): ConcentrateGrowLiquidity2DArgs;
|
|
16
|
+
/**
|
|
17
|
+
* Decodes hex data into ConcentrateGrowLiquidity2DArgs instance
|
|
18
|
+
**/
|
|
19
|
+
static decode(data: HexString): ConcentrateGrowLiquidity2DArgs;
|
|
20
|
+
toJSON(): Record<string, unknown>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for concentrateGrowLiquidity2D instruction with two deltas
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L172
|
|
6
|
+
**/
|
|
7
|
+
export declare class ConcentrateGrowLiquidity2DArgs implements IArgsData {
|
|
8
|
+
readonly deltaLt: bigint;
|
|
9
|
+
readonly deltaGt: bigint;
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(deltaLt: bigint, deltaGt: bigint);
|
|
12
|
+
/**
|
|
13
|
+
* Helper to create args from token addresses and deltas (handles ordering)
|
|
14
|
+
**/
|
|
15
|
+
static fromTokenDeltas(tokenA: Address, tokenB: Address, deltaA: bigint, deltaB: bigint): ConcentrateGrowLiquidity2DArgs;
|
|
16
|
+
/**
|
|
17
|
+
* Decodes hex data into ConcentrateGrowLiquidity2DArgs instance
|
|
18
|
+
**/
|
|
19
|
+
static decode(data: HexString): ConcentrateGrowLiquidity2DArgs;
|
|
20
|
+
toJSON(): Record<string, unknown>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { ConcentrateGrowLiquidityXDArgs } from './concentrate-grow-liquidity-xd-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class ConcentrateGrowLiquidityXDArgsCoder implements IArgsCoder<ConcentrateGrowLiquidityXDArgs> {
|
|
5
|
+
encode(args: ConcentrateGrowLiquidityXDArgs): HexString;
|
|
6
|
+
decode(data: HexString): ConcentrateGrowLiquidityXDArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { ConcentrateGrowLiquidityXDArgs } from './concentrate-grow-liquidity-xd-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class ConcentrateGrowLiquidityXDArgsCoder implements IArgsCoder<ConcentrateGrowLiquidityXDArgs> {
|
|
5
|
+
encode(args: ConcentrateGrowLiquidityXDArgs): HexString;
|
|
6
|
+
decode(data: HexString): ConcentrateGrowLiquidityXDArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { TokenDelta } from './types';
|
|
3
|
+
import type { IArgsData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for concentrateGrowLiquidityXD instruction with multiple token deltas
|
|
6
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L139
|
|
7
|
+
**/
|
|
8
|
+
export declare class ConcentrateGrowLiquidityXDArgs implements IArgsData {
|
|
9
|
+
readonly tokenDeltas: TokenDelta[];
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(tokenDeltas: TokenDelta[]);
|
|
12
|
+
/**
|
|
13
|
+
* Decodes hex data into ConcentrateGrowLiquidityXDArgs instance
|
|
14
|
+
**/
|
|
15
|
+
static decode(data: HexString): ConcentrateGrowLiquidityXDArgs;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { TokenDelta } from './types';
|
|
3
|
+
import type { IArgsData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments for concentrateGrowLiquidityXD instruction with multiple token deltas
|
|
6
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L139
|
|
7
|
+
**/
|
|
8
|
+
export declare class ConcentrateGrowLiquidityXDArgs implements IArgsData {
|
|
9
|
+
readonly tokenDeltas: TokenDelta[];
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(tokenDeltas: TokenDelta[]);
|
|
12
|
+
/**
|
|
13
|
+
* Decodes hex data into ConcentrateGrowLiquidityXDArgs instance
|
|
14
|
+
**/
|
|
15
|
+
static decode(data: HexString): ConcentrateGrowLiquidityXDArgs;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './opcodes';
|
|
2
|
+
export { ConcentrateGrowLiquidityXDArgs } from './concentrate-grow-liquidity-xd-args';
|
|
3
|
+
export { ConcentrateGrowLiquidity2DArgs } from './concentrate-grow-liquidity-2d-args';
|
|
4
|
+
export type { TokenDelta } from './types';
|
|
5
|
+
export * from './utils';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './opcodes';
|
|
2
|
+
export { ConcentrateGrowLiquidityXDArgs } from './concentrate-grow-liquidity-xd-args';
|
|
3
|
+
export { ConcentrateGrowLiquidity2DArgs } from './concentrate-grow-liquidity-2d-args';
|
|
4
|
+
export type { TokenDelta } from './types';
|
|
5
|
+
export * from './utils';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concentrates liquidity within price bounds for multiple tokens
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L139
|
|
4
|
+
**/
|
|
5
|
+
export declare const concentrateGrowLiquidityXD: any;
|
|
6
|
+
/**
|
|
7
|
+
* Concentrates liquidity within price bounds for two tokens
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L172
|
|
9
|
+
**/
|
|
10
|
+
export declare const concentrateGrowLiquidity2D: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concentrates liquidity within price bounds for multiple tokens
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L139
|
|
4
|
+
**/
|
|
5
|
+
export declare const concentrateGrowLiquidityXD: any;
|
|
6
|
+
/**
|
|
7
|
+
* Concentrates liquidity within price bounds for two tokens
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/XYCConcentrate.sol#L172
|
|
9
|
+
**/
|
|
10
|
+
export declare const concentrateGrowLiquidity2D: any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { DeadlineArgs } from './deadline-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class DeadlineArgsCoder implements IArgsCoder<DeadlineArgs> {
|
|
5
|
+
encode(args: DeadlineArgs): HexString;
|
|
6
|
+
decode(data: HexString): DeadlineArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { DeadlineArgs } from './deadline-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class DeadlineArgsCoder implements IArgsCoder<DeadlineArgs> {
|
|
5
|
+
encode(args: DeadlineArgs): HexString;
|
|
6
|
+
decode(data: HexString): DeadlineArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class DeadlineArgs implements IArgsData {
|
|
4
|
+
readonly deadline: bigint;
|
|
5
|
+
static readonly CODER: any;
|
|
6
|
+
constructor(deadline: bigint);
|
|
7
|
+
static decode(data: HexString): DeadlineArgs;
|
|
8
|
+
toJSON(): Record<string, unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class DeadlineArgs implements IArgsData {
|
|
4
|
+
readonly deadline: bigint;
|
|
5
|
+
static readonly CODER: any;
|
|
6
|
+
constructor(deadline: bigint);
|
|
7
|
+
static decode(data: HexString): DeadlineArgs;
|
|
8
|
+
toJSON(): Record<string, unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './opcodes';
|
|
2
|
+
export { JumpArgs } from './jump-args';
|
|
3
|
+
export { JumpIfTokenArgs } from './jump-if-token-args';
|
|
4
|
+
export { DeadlineArgs } from './deadline-args';
|
|
5
|
+
export { OnlyTakerTokenBalanceNonZeroArgs } from './only-taker-token-balance-non-zero-args';
|
|
6
|
+
export { OnlyTakerTokenBalanceGteArgs } from './only-taker-token-balance-gte-args';
|
|
7
|
+
export { OnlyTakerTokenSupplyShareGteArgs } from './only-taker-token-supply-share-gte-args';
|
|
8
|
+
export { SaltArgs } from './salt-args';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './opcodes';
|
|
2
|
+
export { JumpArgs } from './jump-args';
|
|
3
|
+
export { JumpIfTokenArgs } from './jump-if-token-args';
|
|
4
|
+
export { DeadlineArgs } from './deadline-args';
|
|
5
|
+
export { OnlyTakerTokenBalanceNonZeroArgs } from './only-taker-token-balance-non-zero-args';
|
|
6
|
+
export { OnlyTakerTokenBalanceGteArgs } from './only-taker-token-balance-gte-args';
|
|
7
|
+
export { OnlyTakerTokenSupplyShareGteArgs } from './only-taker-token-supply-share-gte-args';
|
|
8
|
+
export { SaltArgs } from './salt-args';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { JumpArgs } from './jump-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class JumpArgsCoder implements IArgsCoder<JumpArgs> {
|
|
5
|
+
encode(args: JumpArgs): HexString;
|
|
6
|
+
decode(data: HexString): JumpArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { JumpArgs } from './jump-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class JumpArgsCoder implements IArgsCoder<JumpArgs> {
|
|
5
|
+
encode(args: JumpArgs): HexString;
|
|
6
|
+
decode(data: HexString): JumpArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for jump instructions containing target program counter
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Controls.sol#L10
|
|
6
|
+
**/
|
|
7
|
+
export declare class JumpArgs implements IArgsData {
|
|
8
|
+
readonly nextPC: bigint;
|
|
9
|
+
static readonly CODER: any;
|
|
10
|
+
constructor(nextPC: bigint);
|
|
11
|
+
/**
|
|
12
|
+
* Decodes hex data into JumpArgs instance
|
|
13
|
+
**/
|
|
14
|
+
static decode(data: HexString): JumpArgs;
|
|
15
|
+
toJSON(): Record<string, unknown>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for jump instructions containing target program counter
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Controls.sol#L10
|
|
6
|
+
**/
|
|
7
|
+
export declare class JumpArgs implements IArgsData {
|
|
8
|
+
readonly nextPC: bigint;
|
|
9
|
+
static readonly CODER: any;
|
|
10
|
+
constructor(nextPC: bigint);
|
|
11
|
+
/**
|
|
12
|
+
* Decodes hex data into JumpArgs instance
|
|
13
|
+
**/
|
|
14
|
+
static decode(data: HexString): JumpArgs;
|
|
15
|
+
toJSON(): Record<string, unknown>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { JumpIfTokenArgs } from './jump-if-token-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class JumpIfTokenArgsCoder implements IArgsCoder<JumpIfTokenArgs> {
|
|
5
|
+
encode(args: JumpIfTokenArgs): HexString;
|
|
6
|
+
decode(data: HexString): JumpIfTokenArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { JumpIfTokenArgs } from './jump-if-token-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class JumpIfTokenArgsCoder implements IArgsCoder<JumpIfTokenArgs> {
|
|
5
|
+
encode(args: JumpIfTokenArgs): HexString;
|
|
6
|
+
decode(data: HexString): JumpIfTokenArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HexString, AddressHalf } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class JumpIfTokenArgs implements IArgsData {
|
|
4
|
+
readonly tokenTail: AddressHalf;
|
|
5
|
+
readonly nextPC: bigint;
|
|
6
|
+
static readonly CODER: any;
|
|
7
|
+
constructor(tokenTail: AddressHalf, nextPC: bigint);
|
|
8
|
+
static decode(data: HexString): JumpIfTokenArgs;
|
|
9
|
+
toJSON(): Record<string, unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HexString, AddressHalf } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class JumpIfTokenArgs implements IArgsData {
|
|
4
|
+
readonly tokenTail: AddressHalf;
|
|
5
|
+
readonly nextPC: bigint;
|
|
6
|
+
static readonly CODER: any;
|
|
7
|
+
constructor(tokenTail: AddressHalf, nextPC: bigint);
|
|
8
|
+
static decode(data: HexString): JumpIfTokenArgs;
|
|
9
|
+
toJSON(): Record<string, unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { OnlyTakerTokenBalanceGteArgs } from './only-taker-token-balance-gte-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class OnlyTakerTokenBalanceGteArgsCoder implements IArgsCoder<OnlyTakerTokenBalanceGteArgs> {
|
|
5
|
+
encode(args: OnlyTakerTokenBalanceGteArgs): HexString;
|
|
6
|
+
decode(data: HexString): OnlyTakerTokenBalanceGteArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { OnlyTakerTokenBalanceGteArgs } from './only-taker-token-balance-gte-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class OnlyTakerTokenBalanceGteArgsCoder implements IArgsCoder<OnlyTakerTokenBalanceGteArgs> {
|
|
5
|
+
encode(args: OnlyTakerTokenBalanceGteArgs): HexString;
|
|
6
|
+
decode(data: HexString): OnlyTakerTokenBalanceGteArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for checking if taker holds at least specified amount of token
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Controls.sol#L10
|
|
6
|
+
**/
|
|
7
|
+
export declare class OnlyTakerTokenBalanceGteArgs implements IArgsData {
|
|
8
|
+
readonly token: Address;
|
|
9
|
+
readonly minAmount: bigint;
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
constructor(token: Address, minAmount: bigint);
|
|
12
|
+
/**
|
|
13
|
+
* Decodes hex data into OnlyTakerTokenBalanceGteArgs instance
|
|
14
|
+
**/
|
|
15
|
+
static decode(data: HexString): OnlyTakerTokenBalanceGteArgs;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|