opnet 1.0.39 → 1.0.41
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/browser/_version.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/scripts/block.d.ts +1 -0
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/json/MOTOSWAP_POOL_ABI.js +0 -2
- package/build/abi/shared/json/OP_20_ABI.js +11 -0
- package/build/scripts/block.d.ts +1 -0
- package/build/scripts/block.js +13 -0
- package/build/scripts/testMethodsReg.js +4 -12
- package/cjs/_version.d.ts +1 -1
- package/cjs/_version.js +1 -1
- package/cjs/abi/shared/interfaces/IMotoContract.d.ts +6 -0
- package/cjs/abi/shared/interfaces/IMotoContract.js +2 -0
- package/cjs/abi/shared/interfaces/IMotoswapFactoryContract.d.ts +7 -0
- package/cjs/abi/shared/interfaces/IMotoswapFactoryContract.js +2 -0
- package/cjs/abi/shared/interfaces/IMotoswapPoolContract.d.ts +13 -0
- package/cjs/abi/shared/interfaces/IMotoswapPoolContract.js +2 -0
- package/cjs/abi/shared/interfaces/IMotoswapRouterContract.d.ts +15 -0
- package/cjs/abi/shared/interfaces/IMotoswapRouterContract.js +2 -0
- package/cjs/abi/shared/interfaces/IOP_20Contract.d.ts +16 -0
- package/cjs/abi/shared/interfaces/IOP_20Contract.js +2 -0
- package/cjs/abi/shared/interfaces/IOP_NETContract.d.ts +7 -0
- package/cjs/abi/shared/interfaces/IOP_NETContract.js +2 -0
- package/cjs/abi/shared/interfaces/IStackingContract.d.ts +11 -0
- package/cjs/abi/shared/interfaces/IStackingContract.js +2 -0
- package/cjs/abi/shared/interfaces/IWBTCContract.d.ts +8 -0
- package/cjs/abi/shared/interfaces/IWBTCContract.js +2 -0
- package/cjs/abi/shared/json/MOTOSWAP_FACTORY_ABI.d.ts +3 -0
- package/cjs/abi/shared/json/MOTOSWAP_FACTORY_ABI.js +74 -0
- package/cjs/abi/shared/json/MOTOSWAP_POOL_ABI.d.ts +3 -0
- package/cjs/abi/shared/json/MOTOSWAP_POOL_ABI.js +280 -0
- package/cjs/abi/shared/json/MOTOSWAP_ROUTER_ABI.d.ts +2 -0
- package/cjs/abi/shared/json/MOTOSWAP_ROUTER_ABI.js +277 -0
- package/cjs/abi/shared/json/MOTO_TOKEN_ABI.d.ts +2 -0
- package/cjs/abi/shared/json/MOTO_TOKEN_ABI.js +25 -0
- package/cjs/abi/shared/json/OP_20_ABI.d.ts +3 -0
- package/cjs/abi/shared/json/OP_20_ABI.js +259 -0
- package/cjs/abi/shared/json/OP_NET_ABI.d.ts +2 -0
- package/cjs/abi/shared/json/OP_NET_ABI.js +34 -0
- package/cjs/abi/shared/json/STAKING_ABI.d.ts +3 -0
- package/cjs/abi/shared/json/STAKING_ABI.js +132 -0
- package/cjs/abi/shared/json/WBTC_ABI.d.ts +3 -0
- package/cjs/abi/shared/json/WBTC_ABI.js +60 -0
- package/cjs/common/CommonTypes.d.ts +2 -1
- package/cjs/contracts/CallResult.d.ts +6 -2
- package/cjs/contracts/CallResult.js +14 -6
- package/cjs/contracts/Contract.d.ts +8 -4
- package/cjs/contracts/Contract.js +172 -19
- package/cjs/contracts/interfaces/ICallResult.d.ts +1 -0
- package/cjs/contracts/interfaces/IContract.d.ts +3 -0
- package/cjs/opnet.d.ts +18 -0
- package/cjs/opnet.js +18 -0
- package/cjs/providers/AbstractRpcProvider.d.ts +5 -3
- package/cjs/providers/AbstractRpcProvider.js +41 -7
- package/cjs/providers/JSONRpcProvider.d.ts +1 -1
- package/cjs/scripts/testMethods.js +3 -10
- package/cjs/scripts/testMethodsReg.js +6 -8
- package/cjs/scripts/testWBTCContract.d.ts +1 -0
- package/cjs/scripts/testWBTCContract.js +13 -0
- package/cjs/transactions/TransactionParser.js +7 -0
- package/cjs/transactions/decoders/UnwrapTransaction.d.ts +11 -0
- package/cjs/transactions/decoders/UnwrapTransaction.js +33 -0
- package/cjs/transactions/interfaces/transactions/IUnwrapTransaction.d.ts +28 -0
- package/cjs/transactions/interfaces/transactions/IUnwrapTransaction.js +2 -0
- package/package.json +2 -2
- package/src/_version.ts +1 -1
- package/src/abi/shared/json/MOTOSWAP_POOL_ABI.ts +0 -4
- package/src/abi/shared/json/OP_20_ABI.ts +11 -0
- package/src/scripts/block.ts +16 -0
- package/src/scripts/testMethodsReg.ts +8 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.41";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.41';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ABIDataTypes } from '@btc-vision/bsi-binary';
|
|
2
2
|
import { BitcoinAbiTypes } from '../../BitcoinAbiTypes.js';
|
|
3
3
|
import { OP_20_ABI } from './OP_20_ABI.js';
|
|
4
|
-
import { OP_NET_ABI } from './OP_NET_ABI.js';
|
|
5
4
|
export const MotoSwapPoolEvents = [
|
|
6
5
|
{
|
|
7
6
|
name: 'PoolBurn',
|
|
@@ -85,7 +84,6 @@ export const MotoSwapPoolEvents = [
|
|
|
85
84
|
},
|
|
86
85
|
];
|
|
87
86
|
export const MotoswapPoolAbi = [
|
|
88
|
-
...OP_NET_ABI,
|
|
89
87
|
...OP_20_ABI,
|
|
90
88
|
{
|
|
91
89
|
name: 'initialize',
|
|
@@ -251,6 +251,17 @@ export const OP_20_ABI = [
|
|
|
251
251
|
],
|
|
252
252
|
type: BitcoinAbiTypes.Function,
|
|
253
253
|
},
|
|
254
|
+
{
|
|
255
|
+
name: 'maximumSupply',
|
|
256
|
+
inputs: [],
|
|
257
|
+
outputs: [
|
|
258
|
+
{
|
|
259
|
+
name: 'maximumSupply',
|
|
260
|
+
type: ABIDataTypes.UINT256,
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
type: BitcoinAbiTypes.Function,
|
|
264
|
+
},
|
|
254
265
|
...OP20Events,
|
|
255
266
|
...OP_NET_ABI,
|
|
256
267
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSONRpcProvider } from '../providers/JSONRpcProvider.js';
|
|
2
|
+
const provider = new JSONRpcProvider('http://localhost:9001');
|
|
3
|
+
for (let i = 0; i < 10; i++) {
|
|
4
|
+
(async () => {
|
|
5
|
+
try {
|
|
6
|
+
const block = await provider.getBlock(i);
|
|
7
|
+
console.log(block);
|
|
8
|
+
}
|
|
9
|
+
catch (e) {
|
|
10
|
+
console.log(e.message);
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
+
import { MOTO_ADDRESS_REGTEST } from '@btc-vision/transaction';
|
|
1
2
|
import { WBTC_ABI } from '../abi/shared/json/WBTC_ABI.js';
|
|
2
3
|
import { getContract } from '../contracts/Contract.js';
|
|
3
4
|
import { JSONRpcProvider } from '../providers/JSONRpcProvider.js';
|
|
4
5
|
const provider = new JSONRpcProvider('http://localhost:9001');
|
|
5
|
-
const contract = getContract(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
try {
|
|
9
|
-
const blocks = await provider.getBlocks([1, 2, 3, 4, 5, 6, 7]);
|
|
10
|
-
console.log(blocks);
|
|
11
|
-
}
|
|
12
|
-
catch (e) {
|
|
13
|
-
console.log(e.message);
|
|
14
|
-
}
|
|
15
|
-
})();
|
|
16
|
-
}
|
|
6
|
+
const contract = getContract(MOTO_ADDRESS_REGTEST, WBTC_ABI, provider, 'bcrt1p2m2yz9hae5lkypuf8heh6udnt0tchmxhaftcfslqsr5vrwzh34yqgn6hs6');
|
|
7
|
+
const decimals = contract.encodeCalldata('decimals', []);
|
|
8
|
+
console.log(decimals);
|
package/cjs/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.40";
|
package/cjs/_version.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
4
|
+
export interface IMotoContract extends IOP_20Contract {
|
|
5
|
+
airdrop(list: Map<Address, bigint>): Promise<BaseContractProperty>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
|
+
export interface IMotoswapFactoryContract extends IOP_NETContract {
|
|
5
|
+
getPool(token0: Address, token1: Address): Promise<BaseContractProperty>;
|
|
6
|
+
createPool(token0: Address, token1: Address): Promise<BaseContractProperty>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
4
|
+
export interface IMotoswapPoolContract extends Omit<IOP_20Contract, 'burn' | 'mint'> {
|
|
5
|
+
token0(): Promise<BaseContractProperty>;
|
|
6
|
+
token1(): Promise<BaseContractProperty>;
|
|
7
|
+
getReserves(): Promise<BaseContractProperty>;
|
|
8
|
+
swap(amount0Out: bigint, amount1Out: bigint, to: string, data: Uint8Array): Promise<BaseContractProperty>;
|
|
9
|
+
burn(to: Address): Promise<BaseContractProperty>;
|
|
10
|
+
sync(): Promise<BaseContractProperty>;
|
|
11
|
+
price0CumulativeLast(): Promise<BaseContractProperty>;
|
|
12
|
+
price1CumulativeLast(): Promise<BaseContractProperty>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
|
+
export interface IMotoswapRouterContract extends IOP_NETContract {
|
|
5
|
+
addLiquidity(tokenA: Address, tokenB: Address, amountADesired: bigint, amountBDesired: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
6
|
+
removeLiquidity(tokenA: Address, tokenB: Address, liquidity: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
7
|
+
quote(amountA: bigint, reserveA: bigint, reserveB: bigint): Promise<BaseContractProperty>;
|
|
8
|
+
getAmountOut(amountIn: bigint, reserveIn: bigint, reserveOut: bigint): Promise<BaseContractProperty>;
|
|
9
|
+
getAmountIn(amountOut: bigint, reserveIn: bigint, reserveOut: bigint): Promise<BaseContractProperty>;
|
|
10
|
+
getAmountsOut(amountIn: bigint, path: Address[]): Promise<BaseContractProperty>;
|
|
11
|
+
getAmountsIn(amountOut: bigint, path: Address[]): Promise<BaseContractProperty>;
|
|
12
|
+
swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: bigint, amountOutMin: bigint, path: Address[], to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
13
|
+
factory(): Promise<BaseContractProperty>;
|
|
14
|
+
WBTC(): Promise<BaseContractProperty>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BitcoinAddressLike } from '../../../common/CommonTypes.js';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
|
+
export interface IOP_20Contract extends IOP_NETContract {
|
|
5
|
+
balanceOf(address: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
6
|
+
name(): Promise<BaseContractProperty>;
|
|
7
|
+
symbol(): Promise<BaseContractProperty>;
|
|
8
|
+
totalSupply(): Promise<BaseContractProperty>;
|
|
9
|
+
decimals(): Promise<BaseContractProperty>;
|
|
10
|
+
transfer(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
11
|
+
transferFrom(from: BitcoinAddressLike, to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
12
|
+
approve(spender: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
13
|
+
allowance(owner: BitcoinAddressLike, spender: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
14
|
+
mint(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
15
|
+
burn(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BitcoinAddressLike } from '../../../common/CommonTypes.js';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { BaseContractProperties } from '../../interfaces/BaseContractProperties.js';
|
|
4
|
+
export interface IOP_NETContract extends BaseContractProperties {
|
|
5
|
+
owner(): Promise<BaseContractProperty>;
|
|
6
|
+
isAddressOwner(address: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperties } from '../../interfaces/BaseContractProperties.js';
|
|
3
|
+
export interface IStackingContract {
|
|
4
|
+
stake(amount: bigint): Promise<BaseContractProperties>;
|
|
5
|
+
unstake(): Promise<BaseContractProperties>;
|
|
6
|
+
stakedAmount(address: Address): Promise<BaseContractProperties>;
|
|
7
|
+
stakedReward(address: Address): Promise<BaseContractProperties>;
|
|
8
|
+
claim(): Promise<BaseContractProperties>;
|
|
9
|
+
rewardPool(): Promise<BaseContractProperties>;
|
|
10
|
+
totalStaked(): Promise<BaseContractProperties>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
2
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
3
|
+
import { IStackingContract } from './IStackingContract.js';
|
|
4
|
+
export type MergedOP_20AndStackingContract = IOP_20Contract & IStackingContract;
|
|
5
|
+
export interface IWBTCContract extends MergedOP_20AndStackingContract {
|
|
6
|
+
requestWithdrawal(amount: bigint): Promise<BaseContractProperty>;
|
|
7
|
+
withdrawableBalanceOf(address: string): Promise<BaseContractProperty>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotoSwapFactoryAbi = exports.MotoSwapFactoryEvents = void 0;
|
|
4
|
+
const bsi_binary_1 = require("@btc-vision/bsi-binary");
|
|
5
|
+
const BitcoinAbiTypes_js_1 = require("../../BitcoinAbiTypes.js");
|
|
6
|
+
const OP_NET_ABI_js_1 = require("./OP_NET_ABI.js");
|
|
7
|
+
exports.MotoSwapFactoryEvents = [
|
|
8
|
+
{
|
|
9
|
+
name: 'PoolCreated',
|
|
10
|
+
values: [
|
|
11
|
+
{
|
|
12
|
+
name: 'token0',
|
|
13
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'token1',
|
|
17
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'pool',
|
|
21
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Event,
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
exports.MotoSwapFactoryAbi = [
|
|
28
|
+
{
|
|
29
|
+
name: 'createPool',
|
|
30
|
+
inputs: [
|
|
31
|
+
{
|
|
32
|
+
name: 'tokenA',
|
|
33
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'tokenB',
|
|
37
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
outputs: [
|
|
41
|
+
{
|
|
42
|
+
name: 'pool',
|
|
43
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'poolAddr',
|
|
47
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'getPool',
|
|
54
|
+
inputs: [
|
|
55
|
+
{
|
|
56
|
+
name: 'tokenA',
|
|
57
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'tokenB',
|
|
61
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
outputs: [
|
|
65
|
+
{
|
|
66
|
+
name: 'pool',
|
|
67
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
71
|
+
},
|
|
72
|
+
...exports.MotoSwapFactoryEvents,
|
|
73
|
+
...OP_NET_ABI_js_1.OP_NET_ABI,
|
|
74
|
+
];
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotoswapPoolAbi = exports.MotoSwapPoolEvents = void 0;
|
|
4
|
+
const bsi_binary_1 = require("@btc-vision/bsi-binary");
|
|
5
|
+
const BitcoinAbiTypes_js_1 = require("../../BitcoinAbiTypes.js");
|
|
6
|
+
const OP_20_ABI_js_1 = require("./OP_20_ABI.js");
|
|
7
|
+
exports.MotoSwapPoolEvents = [
|
|
8
|
+
{
|
|
9
|
+
name: 'PoolBurn',
|
|
10
|
+
values: [
|
|
11
|
+
{
|
|
12
|
+
name: 'sender',
|
|
13
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'amount0',
|
|
17
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'amount1',
|
|
21
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Event,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'PoolMint',
|
|
28
|
+
values: [
|
|
29
|
+
{
|
|
30
|
+
name: 'sender',
|
|
31
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'amount0',
|
|
35
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'amount1',
|
|
39
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Event,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Swap',
|
|
46
|
+
values: [
|
|
47
|
+
{
|
|
48
|
+
name: 'sender',
|
|
49
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'amount0In',
|
|
53
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'amount1In',
|
|
57
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'amount0Out',
|
|
61
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'amount1Out',
|
|
65
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'to',
|
|
69
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Event,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Sync',
|
|
76
|
+
values: [
|
|
77
|
+
{
|
|
78
|
+
name: 'reserve0',
|
|
79
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'reserve1',
|
|
83
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Event,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
exports.MotoswapPoolAbi = [
|
|
90
|
+
...OP_20_ABI_js_1.OP_20_ABI,
|
|
91
|
+
{
|
|
92
|
+
name: 'initialize',
|
|
93
|
+
inputs: [
|
|
94
|
+
{
|
|
95
|
+
name: 'token0',
|
|
96
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'token1',
|
|
100
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
outputs: [
|
|
104
|
+
{
|
|
105
|
+
name: 'success',
|
|
106
|
+
type: bsi_binary_1.ABIDataTypes.BOOL,
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'swap',
|
|
113
|
+
inputs: [
|
|
114
|
+
{
|
|
115
|
+
name: 'amount0Out',
|
|
116
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'amount1Out',
|
|
120
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'to',
|
|
124
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'data',
|
|
128
|
+
type: bsi_binary_1.ABIDataTypes.BYTES,
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
outputs: [
|
|
132
|
+
{
|
|
133
|
+
name: 'success',
|
|
134
|
+
type: bsi_binary_1.ABIDataTypes.BOOL,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'skim',
|
|
141
|
+
inputs: [],
|
|
142
|
+
outputs: [
|
|
143
|
+
{
|
|
144
|
+
name: 'success',
|
|
145
|
+
type: bsi_binary_1.ABIDataTypes.BOOL,
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'getReserves',
|
|
152
|
+
inputs: [],
|
|
153
|
+
outputs: [
|
|
154
|
+
{
|
|
155
|
+
name: 'reserve0',
|
|
156
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'reserve1',
|
|
160
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'blockTimestampLast',
|
|
164
|
+
type: bsi_binary_1.ABIDataTypes.UINT64,
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'token0',
|
|
171
|
+
constant: true,
|
|
172
|
+
inputs: [],
|
|
173
|
+
outputs: [
|
|
174
|
+
{
|
|
175
|
+
name: 'token0',
|
|
176
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'token1',
|
|
183
|
+
constant: true,
|
|
184
|
+
inputs: [],
|
|
185
|
+
outputs: [
|
|
186
|
+
{
|
|
187
|
+
name: 'token1',
|
|
188
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'price0CumulativeLast',
|
|
195
|
+
inputs: [],
|
|
196
|
+
outputs: [
|
|
197
|
+
{
|
|
198
|
+
name: 'price0CumulativeLast',
|
|
199
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'price1CumulativeLast',
|
|
206
|
+
inputs: [],
|
|
207
|
+
outputs: [
|
|
208
|
+
{
|
|
209
|
+
name: 'price1CumulativeLast',
|
|
210
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'kLast',
|
|
217
|
+
inputs: [],
|
|
218
|
+
outputs: [
|
|
219
|
+
{
|
|
220
|
+
name: 'kLast',
|
|
221
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'blockTimestampLast',
|
|
228
|
+
inputs: [],
|
|
229
|
+
outputs: [
|
|
230
|
+
{
|
|
231
|
+
name: 'blockTimestampLast',
|
|
232
|
+
type: bsi_binary_1.ABIDataTypes.UINT64,
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'sync',
|
|
239
|
+
inputs: [],
|
|
240
|
+
outputs: [
|
|
241
|
+
{
|
|
242
|
+
name: 'success',
|
|
243
|
+
type: bsi_binary_1.ABIDataTypes.BOOL,
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'mint',
|
|
250
|
+
inputs: [],
|
|
251
|
+
outputs: [
|
|
252
|
+
{
|
|
253
|
+
name: 'liquidity',
|
|
254
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'burn',
|
|
261
|
+
inputs: [
|
|
262
|
+
{
|
|
263
|
+
name: 'to',
|
|
264
|
+
type: bsi_binary_1.ABIDataTypes.ADDRESS,
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
outputs: [
|
|
268
|
+
{
|
|
269
|
+
name: 'amount0',
|
|
270
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: 'amount1',
|
|
274
|
+
type: bsi_binary_1.ABIDataTypes.UINT256,
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
|
|
278
|
+
},
|
|
279
|
+
...exports.MotoSwapPoolEvents,
|
|
280
|
+
];
|