quantumswap 0.0.6 → 0.0.8
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/README.md +307 -307
- package/examples/README.md +46 -46
- package/examples/package-lock.json +12 -12
- package/examples/package.json +1 -1
- package/index.d.ts +1 -1
- package/index.js +45 -45
- package/package.json +32 -32
- package/src/IERC20.d.ts +24 -24
- package/src/IERC20.js +348 -348
- package/src/IERC20__factory.d.ts +10 -10
- package/src/IERC20__factory.js +29 -29
- package/src/QuantumSwapV2ERC20.d.ts +24 -24
- package/src/QuantumSwapV2ERC20.js +353 -353
- package/src/QuantumSwapV2ERC20__factory.d.ts +10 -10
- package/src/QuantumSwapV2ERC20__factory.js +29 -29
- package/src/QuantumSwapV2Factory.d.ts +24 -24
- package/src/QuantumSwapV2Factory.js +310 -310
- package/src/QuantumSwapV2Factory__factory.d.ts +10 -10
- package/src/QuantumSwapV2Factory__factory.js +29 -29
- package/src/QuantumSwapV2Pair.d.ts +44 -44
- package/src/QuantumSwapV2Pair.js +847 -847
- package/src/QuantumSwapV2Pair__factory.d.ts +10 -10
- package/src/QuantumSwapV2Pair__factory.js +29 -29
- package/src/QuantumSwapV2Router02.d.ts +47 -47
- package/src/QuantumSwapV2Router02.js +1109 -1109
- package/src/QuantumSwapV2Router02__factory.d.ts +10 -10
- package/src/QuantumSwapV2Router02__factory.js +29 -29
- package/src/WQ.d.ts +28 -28
- package/src/WQ.js +435 -435
- package/src/WQ__factory.d.ts +10 -10
- package/src/WQ__factory.js +29 -29
- package/src/index.d.ts +14 -14
- package/src/index.js +15 -15
- package/src/quantumcoin-shims.d.ts +25 -25
- package/src/types.d.ts +3 -3
- package/src/types.js +3 -3
- package/test/e2e/IERC20.e2e.test.js +8 -13
- package/test/e2e/all-contracts.e2e.test.js +10 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Auto-generated by sdkgen
|
|
2
|
-
import { ContractFactory, ContractRunner } from "quantumcoin";
|
|
3
|
-
import { QuantumSwapV2ERC20 } from "./QuantumSwapV2ERC20";
|
|
4
|
-
import type * as Types from "./types";
|
|
5
|
-
|
|
6
|
-
export declare class QuantumSwapV2ERC20__factory extends ContractFactory {
|
|
7
|
-
constructor(runner: ContractRunner);
|
|
8
|
-
deploy(overrides?: any): Promise<QuantumSwapV2ERC20>;
|
|
9
|
-
static connect(address: string, runner?: ContractRunner): QuantumSwapV2ERC20;
|
|
10
|
-
}
|
|
1
|
+
// Auto-generated by sdkgen
|
|
2
|
+
import { ContractFactory, ContractRunner } from "quantumcoin";
|
|
3
|
+
import { QuantumSwapV2ERC20 } from "./QuantumSwapV2ERC20";
|
|
4
|
+
import type * as Types from "./types";
|
|
5
|
+
|
|
6
|
+
export declare class QuantumSwapV2ERC20__factory extends ContractFactory {
|
|
7
|
+
constructor(runner: ContractRunner);
|
|
8
|
+
deploy(overrides?: any): Promise<QuantumSwapV2ERC20>;
|
|
9
|
+
static connect(address: string, runner?: ContractRunner): QuantumSwapV2ERC20;
|
|
10
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// Auto-generated by sdkgen
|
|
2
|
-
const { ContractFactory, getCreateAddress } = require("quantumcoin");
|
|
3
|
-
const { QuantumSwapV2ERC20 } = require("./QuantumSwapV2ERC20");
|
|
4
|
-
|
|
5
|
-
class QuantumSwapV2ERC20__factory extends ContractFactory {
|
|
6
|
-
constructor(runner) {
|
|
7
|
-
super(QuantumSwapV2ERC20.abi, QuantumSwapV2ERC20.bytecode, runner);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
async deploy(overrides) {
|
|
11
|
-
const signer = this.signer;
|
|
12
|
-
if (!signer) { throw new Error("missing signer"); }
|
|
13
|
-
const from = signer.getAddress ? await signer.getAddress() : signer.address;
|
|
14
|
-
const provider = signer.provider;
|
|
15
|
-
if (!provider || !provider.getTransactionCount) { throw new Error("missing provider"); }
|
|
16
|
-
let nonce;
|
|
17
|
-
try { nonce = await provider.getTransactionCount(from, "pending"); } catch { nonce = await provider.getTransactionCount(from, "latest"); }
|
|
18
|
-
const address = getCreateAddress({ from, nonce });
|
|
19
|
-
const txReq = this.getDeployTransaction();
|
|
20
|
-
const tx = await signer.sendTransaction({ ...txReq, ...(overrides || {}), nonce });
|
|
21
|
-
return new QuantumSwapV2ERC20(address, signer, tx);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static connect(address, runner) {
|
|
25
|
-
return QuantumSwapV2ERC20.connect(address, runner);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = { QuantumSwapV2ERC20__factory };
|
|
1
|
+
// Auto-generated by sdkgen
|
|
2
|
+
const { ContractFactory, getCreateAddress } = require("quantumcoin");
|
|
3
|
+
const { QuantumSwapV2ERC20 } = require("./QuantumSwapV2ERC20");
|
|
4
|
+
|
|
5
|
+
class QuantumSwapV2ERC20__factory extends ContractFactory {
|
|
6
|
+
constructor(runner) {
|
|
7
|
+
super(QuantumSwapV2ERC20.abi, QuantumSwapV2ERC20.bytecode, runner);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async deploy(overrides) {
|
|
11
|
+
const signer = this.signer;
|
|
12
|
+
if (!signer) { throw new Error("missing signer"); }
|
|
13
|
+
const from = signer.getAddress ? await signer.getAddress() : signer.address;
|
|
14
|
+
const provider = signer.provider;
|
|
15
|
+
if (!provider || !provider.getTransactionCount) { throw new Error("missing provider"); }
|
|
16
|
+
let nonce;
|
|
17
|
+
try { nonce = await provider.getTransactionCount(from, "pending"); } catch { nonce = await provider.getTransactionCount(from, "latest"); }
|
|
18
|
+
const address = getCreateAddress({ from, nonce });
|
|
19
|
+
const txReq = this.getDeployTransaction();
|
|
20
|
+
const tx = await signer.sendTransaction({ ...txReq, ...(overrides || {}), nonce });
|
|
21
|
+
return new QuantumSwapV2ERC20(address, signer, tx);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static connect(address, runner) {
|
|
25
|
+
return QuantumSwapV2ERC20.connect(address, runner);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = { QuantumSwapV2ERC20__factory };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
// Auto-generated by sdkgen
|
|
2
|
-
import { Contract, ContractRunner, ContractTransactionResponse, TransactionResponse } from "quantumcoin";
|
|
3
|
-
import type * as Types from "./types";
|
|
4
|
-
|
|
5
|
-
export declare class QuantumSwapV2Factory extends Contract {
|
|
6
|
-
static readonly abi: readonly any[];
|
|
7
|
-
static readonly bytecode: string;
|
|
8
|
-
static connect(address: string, runner?: ContractRunner): QuantumSwapV2Factory;
|
|
9
|
-
constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
|
|
10
|
-
readonly populateTransaction: {
|
|
11
|
-
createPair(tokenA: Types.AddressLike, tokenB: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
12
|
-
setFeeTo(_feeTo: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
13
|
-
setFeeToSetter(_feeToSetter: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
14
|
-
};
|
|
15
|
-
INIT_CODE_HASH(): Promise<Types.Bytes32>;
|
|
16
|
-
allPairs(arg0: Types.Uint256Like): Promise<Types.SolAddress>;
|
|
17
|
-
allPairsLength(): Promise<Types.Uint256>;
|
|
18
|
-
createPair(tokenA: Types.AddressLike, tokenB: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
19
|
-
feeTo(): Promise<Types.SolAddress>;
|
|
20
|
-
feeToSetter(): Promise<Types.SolAddress>;
|
|
21
|
-
getPair(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.SolAddress>;
|
|
22
|
-
setFeeTo(_feeTo: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
23
|
-
setFeeToSetter(_feeToSetter: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
24
|
-
}
|
|
1
|
+
// Auto-generated by sdkgen
|
|
2
|
+
import { Contract, ContractRunner, ContractTransactionResponse, TransactionResponse } from "quantumcoin";
|
|
3
|
+
import type * as Types from "./types";
|
|
4
|
+
|
|
5
|
+
export declare class QuantumSwapV2Factory extends Contract {
|
|
6
|
+
static readonly abi: readonly any[];
|
|
7
|
+
static readonly bytecode: string;
|
|
8
|
+
static connect(address: string, runner?: ContractRunner): QuantumSwapV2Factory;
|
|
9
|
+
constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
|
|
10
|
+
readonly populateTransaction: {
|
|
11
|
+
createPair(tokenA: Types.AddressLike, tokenB: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
12
|
+
setFeeTo(_feeTo: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
13
|
+
setFeeToSetter(_feeToSetter: Types.AddressLike, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
14
|
+
};
|
|
15
|
+
INIT_CODE_HASH(): Promise<Types.Bytes32>;
|
|
16
|
+
allPairs(arg0: Types.Uint256Like): Promise<Types.SolAddress>;
|
|
17
|
+
allPairsLength(): Promise<Types.Uint256>;
|
|
18
|
+
createPair(tokenA: Types.AddressLike, tokenB: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
19
|
+
feeTo(): Promise<Types.SolAddress>;
|
|
20
|
+
feeToSetter(): Promise<Types.SolAddress>;
|
|
21
|
+
getPair(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.SolAddress>;
|
|
22
|
+
setFeeTo(_feeTo: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
23
|
+
setFeeToSetter(_feeToSetter: Types.AddressLike, overrides?: any): Promise<ContractTransactionResponse>;
|
|
24
|
+
}
|