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 { QuantumSwapV2Router02 } from "./QuantumSwapV2Router02";
|
|
4
|
-
import type * as Types from "./types";
|
|
5
|
-
|
|
6
|
-
export declare class QuantumSwapV2Router02__factory extends ContractFactory {
|
|
7
|
-
constructor(runner: ContractRunner);
|
|
8
|
-
deploy(_factory: Types.AddressLike, _WETH: Types.AddressLike, overrides?: any): Promise<QuantumSwapV2Router02>;
|
|
9
|
-
static connect(address: string, runner?: ContractRunner): QuantumSwapV2Router02;
|
|
10
|
-
}
|
|
1
|
+
// Auto-generated by sdkgen
|
|
2
|
+
import { ContractFactory, ContractRunner } from "quantumcoin";
|
|
3
|
+
import { QuantumSwapV2Router02 } from "./QuantumSwapV2Router02";
|
|
4
|
+
import type * as Types from "./types";
|
|
5
|
+
|
|
6
|
+
export declare class QuantumSwapV2Router02__factory extends ContractFactory {
|
|
7
|
+
constructor(runner: ContractRunner);
|
|
8
|
+
deploy(_factory: Types.AddressLike, _WETH: Types.AddressLike, overrides?: any): Promise<QuantumSwapV2Router02>;
|
|
9
|
+
static connect(address: string, runner?: ContractRunner): QuantumSwapV2Router02;
|
|
10
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// Auto-generated by sdkgen
|
|
2
|
-
const { ContractFactory, getCreateAddress } = require("quantumcoin");
|
|
3
|
-
const { QuantumSwapV2Router02 } = require("./QuantumSwapV2Router02");
|
|
4
|
-
|
|
5
|
-
class QuantumSwapV2Router02__factory extends ContractFactory {
|
|
6
|
-
constructor(runner) {
|
|
7
|
-
super(QuantumSwapV2Router02.abi, QuantumSwapV2Router02.bytecode, runner);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
async deploy(_factory, _WETH, 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(_factory, _WETH);
|
|
20
|
-
const tx = await signer.sendTransaction({ ...txReq, ...(overrides || {}), nonce });
|
|
21
|
-
return new QuantumSwapV2Router02(address, signer, tx);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static connect(address, runner) {
|
|
25
|
-
return QuantumSwapV2Router02.connect(address, runner);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = { QuantumSwapV2Router02__factory };
|
|
1
|
+
// Auto-generated by sdkgen
|
|
2
|
+
const { ContractFactory, getCreateAddress } = require("quantumcoin");
|
|
3
|
+
const { QuantumSwapV2Router02 } = require("./QuantumSwapV2Router02");
|
|
4
|
+
|
|
5
|
+
class QuantumSwapV2Router02__factory extends ContractFactory {
|
|
6
|
+
constructor(runner) {
|
|
7
|
+
super(QuantumSwapV2Router02.abi, QuantumSwapV2Router02.bytecode, runner);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async deploy(_factory, _WETH, 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(_factory, _WETH);
|
|
20
|
+
const tx = await signer.sendTransaction({ ...txReq, ...(overrides || {}), nonce });
|
|
21
|
+
return new QuantumSwapV2Router02(address, signer, tx);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static connect(address, runner) {
|
|
25
|
+
return QuantumSwapV2Router02.connect(address, runner);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = { QuantumSwapV2Router02__factory };
|
package/src/WQ.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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 WQ extends Contract {
|
|
6
|
-
static readonly abi: readonly any[];
|
|
7
|
-
static readonly bytecode: string;
|
|
8
|
-
static connect(address: string, runner?: ContractRunner): WQ;
|
|
9
|
-
constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
|
|
10
|
-
readonly populateTransaction: {
|
|
11
|
-
approve(guy: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
12
|
-
deposit(overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
13
|
-
transfer(dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
14
|
-
transferFrom(src: Types.AddressLike, dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
15
|
-
withdraw(wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
16
|
-
};
|
|
17
|
-
allowance(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.Uint256>;
|
|
18
|
-
approve(guy: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
19
|
-
balanceOf(arg0: Types.AddressLike): Promise<Types.Uint256>;
|
|
20
|
-
decimals(): Promise<Types.Uint8>;
|
|
21
|
-
deposit(overrides?: any): Promise<ContractTransactionResponse>;
|
|
22
|
-
name(): Promise<string>;
|
|
23
|
-
symbol(): Promise<string>;
|
|
24
|
-
totalSupply(): Promise<Types.Uint256>;
|
|
25
|
-
transfer(dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
26
|
-
transferFrom(src: Types.AddressLike, dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
27
|
-
withdraw(wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
28
|
-
}
|
|
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 WQ extends Contract {
|
|
6
|
+
static readonly abi: readonly any[];
|
|
7
|
+
static readonly bytecode: string;
|
|
8
|
+
static connect(address: string, runner?: ContractRunner): WQ;
|
|
9
|
+
constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
|
|
10
|
+
readonly populateTransaction: {
|
|
11
|
+
approve(guy: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
12
|
+
deposit(overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
13
|
+
transfer(dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
14
|
+
transferFrom(src: Types.AddressLike, dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
15
|
+
withdraw(wad: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
|
|
16
|
+
};
|
|
17
|
+
allowance(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.Uint256>;
|
|
18
|
+
approve(guy: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
19
|
+
balanceOf(arg0: Types.AddressLike): Promise<Types.Uint256>;
|
|
20
|
+
decimals(): Promise<Types.Uint8>;
|
|
21
|
+
deposit(overrides?: any): Promise<ContractTransactionResponse>;
|
|
22
|
+
name(): Promise<string>;
|
|
23
|
+
symbol(): Promise<string>;
|
|
24
|
+
totalSupply(): Promise<Types.Uint256>;
|
|
25
|
+
transfer(dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
26
|
+
transferFrom(src: Types.AddressLike, dst: Types.AddressLike, wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
27
|
+
withdraw(wad: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
|
|
28
|
+
}
|