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.
Files changed (38) hide show
  1. package/README.md +307 -307
  2. package/examples/README.md +46 -46
  3. package/examples/package-lock.json +12 -12
  4. package/examples/package.json +1 -1
  5. package/index.d.ts +1 -1
  6. package/index.js +45 -45
  7. package/package.json +32 -32
  8. package/src/IERC20.d.ts +24 -24
  9. package/src/IERC20.js +348 -348
  10. package/src/IERC20__factory.d.ts +10 -10
  11. package/src/IERC20__factory.js +29 -29
  12. package/src/QuantumSwapV2ERC20.d.ts +24 -24
  13. package/src/QuantumSwapV2ERC20.js +353 -353
  14. package/src/QuantumSwapV2ERC20__factory.d.ts +10 -10
  15. package/src/QuantumSwapV2ERC20__factory.js +29 -29
  16. package/src/QuantumSwapV2Factory.d.ts +24 -24
  17. package/src/QuantumSwapV2Factory.js +310 -310
  18. package/src/QuantumSwapV2Factory__factory.d.ts +10 -10
  19. package/src/QuantumSwapV2Factory__factory.js +29 -29
  20. package/src/QuantumSwapV2Pair.d.ts +44 -44
  21. package/src/QuantumSwapV2Pair.js +847 -847
  22. package/src/QuantumSwapV2Pair__factory.d.ts +10 -10
  23. package/src/QuantumSwapV2Pair__factory.js +29 -29
  24. package/src/QuantumSwapV2Router02.d.ts +47 -47
  25. package/src/QuantumSwapV2Router02.js +1109 -1109
  26. package/src/QuantumSwapV2Router02__factory.d.ts +10 -10
  27. package/src/QuantumSwapV2Router02__factory.js +29 -29
  28. package/src/WQ.d.ts +28 -28
  29. package/src/WQ.js +435 -435
  30. package/src/WQ__factory.d.ts +10 -10
  31. package/src/WQ__factory.js +29 -29
  32. package/src/index.d.ts +14 -14
  33. package/src/index.js +15 -15
  34. package/src/quantumcoin-shims.d.ts +25 -25
  35. package/src/types.d.ts +3 -3
  36. package/src/types.js +3 -3
  37. package/test/e2e/IERC20.e2e.test.js +8 -13
  38. 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 { IERC20 } from "./IERC20";
4
- import type * as Types from "./types";
5
-
6
- export declare class IERC20__factory extends ContractFactory {
7
- constructor(runner: ContractRunner);
8
- deploy(overrides?: any): Promise<IERC20>;
9
- static connect(address: string, runner?: ContractRunner): IERC20;
10
- }
1
+ // Auto-generated by sdkgen
2
+ import { ContractFactory, ContractRunner } from "quantumcoin";
3
+ import { IERC20 } from "./IERC20";
4
+ import type * as Types from "./types";
5
+
6
+ export declare class IERC20__factory extends ContractFactory {
7
+ constructor(runner: ContractRunner);
8
+ deploy(overrides?: any): Promise<IERC20>;
9
+ static connect(address: string, runner?: ContractRunner): IERC20;
10
+ }
@@ -1,29 +1,29 @@
1
- // Auto-generated by sdkgen
2
- const { ContractFactory, getCreateAddress } = require("quantumcoin");
3
- const { IERC20 } = require("./IERC20");
4
-
5
- class IERC20__factory extends ContractFactory {
6
- constructor(runner) {
7
- super(IERC20.abi, IERC20.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 IERC20(address, signer, tx);
22
- }
23
-
24
- static connect(address, runner) {
25
- return IERC20.connect(address, runner);
26
- }
27
- }
28
-
29
- module.exports = { IERC20__factory };
1
+ // Auto-generated by sdkgen
2
+ const { ContractFactory, getCreateAddress } = require("quantumcoin");
3
+ const { IERC20 } = require("./IERC20");
4
+
5
+ class IERC20__factory extends ContractFactory {
6
+ constructor(runner) {
7
+ super(IERC20.abi, IERC20.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 IERC20(address, signer, tx);
22
+ }
23
+
24
+ static connect(address, runner) {
25
+ return IERC20.connect(address, runner);
26
+ }
27
+ }
28
+
29
+ module.exports = { IERC20__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 QuantumSwapV2ERC20 extends Contract {
6
- static readonly abi: readonly any[];
7
- static readonly bytecode: string;
8
- static connect(address: string, runner?: ContractRunner): QuantumSwapV2ERC20;
9
- constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
10
- readonly populateTransaction: {
11
- approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
12
- transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
13
- transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
14
- };
15
- allowance(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.Uint256>;
16
- approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
17
- balanceOf(arg0: Types.AddressLike): Promise<Types.Uint256>;
18
- decimals(): Promise<Types.Uint8>;
19
- name(): Promise<string>;
20
- symbol(): Promise<string>;
21
- totalSupply(): Promise<Types.Uint256>;
22
- transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
23
- transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, 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 QuantumSwapV2ERC20 extends Contract {
6
+ static readonly abi: readonly any[];
7
+ static readonly bytecode: string;
8
+ static connect(address: string, runner?: ContractRunner): QuantumSwapV2ERC20;
9
+ constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
10
+ readonly populateTransaction: {
11
+ approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
12
+ transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
13
+ transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
14
+ };
15
+ allowance(arg0: Types.AddressLike, arg1: Types.AddressLike): Promise<Types.Uint256>;
16
+ approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
17
+ balanceOf(arg0: Types.AddressLike): Promise<Types.Uint256>;
18
+ decimals(): Promise<Types.Uint8>;
19
+ name(): Promise<string>;
20
+ symbol(): Promise<string>;
21
+ totalSupply(): Promise<Types.Uint256>;
22
+ transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
23
+ transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
24
+ }