four-flap-meme-sdk 1.9.37 → 1.9.38
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/dist/chains/bsc/platforms/iro/constants.d.ts +1 -1
- package/dist/chains/bsc/platforms/iro/constants.js +7 -0
- package/dist/chains/bsc/platforms/iro/pool.d.ts +7 -0
- package/dist/chains/bsc/platforms/iro/pool.js +7 -0
- package/dist/chains/eni/platforms/iro/constants.d.ts +1 -1
- package/dist/chains/eni/platforms/iro/constants.js +7 -0
- package/dist/chains/eni/platforms/iro/pool.d.ts +7 -0
- package/dist/chains/eni/platforms/iro/pool.js +7 -0
- package/dist/shared/constants/profit.js +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export declare const IROSWAP_V2_FACTORY: "0x637D87a4165C5fF8f6cdDa8EC8cA394b1f0C
|
|
|
11
11
|
export declare const USDT_BSC: "0x55d398326f99059fF775485246999027B3197955";
|
|
12
12
|
export declare const IRO_FACTORY_ABI: readonly ["function createProject(uint256 _projectID, uint256 _totalSupply, uint256 _initPrice, string memory _symbol, uint256[2] memory softAndHardCap, address coinAddr, uint256 pledgeDays, tuple(address account, uint256 quota)[] memory _addressList) returns (address pool)", "function projectIDToken(uint256) view returns (address)", "function getPool(address token) view returns (address poolAddress)", "function allToken(uint256) view returns (address token)", "function allTokensLength() view returns (uint256)", "function tokenInfo(address token) view returns (string name, uint256 totalSupply, uint256 initPrice, address creator, uint256 softCap, uint256 hardCap, bool isWhitelisted, uint256 pledgeDays)", "event CreateProject(uint256 indexed projectID, address indexed token, address indexed pool, address TKAAddr, uint256 len)"];
|
|
13
13
|
export declare const IRO_TOKEN_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function allowance(address owner, address spender) view returns (uint256)", "function approve(address spender, uint256 amount) returns (bool)", "function transfer(address to, uint256 amount) returns (bool)", "function transferFrom(address from, address to, uint256 amount) returns (bool)", "function subscribe(address _user, uint256 amount) payable", "function pledge(address _user, uint256 amount) payable", "function price() view returns (uint256)", "function creator() view returns (address)", "function isOpen() view returns (bool)", "function isWhitelisted() view returns (bool)", "function isWXOC() view returns (bool)", "function tradingLimit() view returns (uint256)", "function totalCreatorFee() view returns (uint256)", "function POOL() view returns (address)", "function TKA() view returns (address)", "function getTokenPrice() view returns (uint256 pairToken, uint256 pairTKA, uint256 newPrice)", "function dayProduce(uint256 day) view returns (bool)"];
|
|
14
|
-
export declare const IRO_POOL_ABI: readonly ["function pledge(address _user, uint256 amount, uint256 share) external", "function removePledge() external", "function extract(uint256 amount) external", "function transferAwards(address[] recipients, uint256[] TKAAmounts) external", "function token() view returns (address)", "function totalShare() view returns (uint256)", "function produceNum() view returns (uint256)", "function produceLpNum() view returns (uint256)", "function produceLimit() view returns (uint256)", "function lastAddProduce() view returns (uint256)", "function getDeposit(address account) view returns (uint256)", "function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)", "function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)", "function increaseRateMap(uint256) view returns (bool status, uint256 rate)"];
|
|
14
|
+
export declare const IRO_POOL_ABI: readonly ["function pledge(address _user, uint256 amount, uint256 share) external", "function removePledge() external", "function extract(uint256 amount) external", "function transferAwards(address[] recipients, uint256[] TKAAmounts) external", "function token() view returns (address)", "function totalShare() view returns (uint256)", "function produceNum() view returns (uint256)", "function produceLpNum() view returns (uint256)", "function produceLimit() view returns (uint256)", "function lastAddProduce() view returns (uint256)", "function getDeposit(address account) view returns (uint256)", "function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)", "function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)", "function increaseRateMap(uint256) view returns (bool status, uint256 rate)", "function totalSupply() view returns (uint256)", "function balanceOf(address) view returns (uint256)", "function lastPrice() view returns (uint256)", "function userAward(address) view returns (uint256)", "function getUserStake(address) view returns (uint256)", "function ownerAddr() view returns (address)", "function isInitialized() view returns (bool)"];
|
|
15
15
|
/** 默认 Gas Limit — createProject */
|
|
16
16
|
export declare const CREATE_PROJECT_GAS_LIMIT = 5000000n;
|
|
17
17
|
/** 默认 Gas Limit — subscribe / pledge (内含 addLiquidity + swap) */
|
|
@@ -78,6 +78,13 @@ export const IRO_POOL_ABI = [
|
|
|
78
78
|
'function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)',
|
|
79
79
|
'function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)',
|
|
80
80
|
'function increaseRateMap(uint256) view returns (bool status, uint256 rate)',
|
|
81
|
+
'function totalSupply() view returns (uint256)',
|
|
82
|
+
'function balanceOf(address) view returns (uint256)',
|
|
83
|
+
'function lastPrice() view returns (uint256)',
|
|
84
|
+
'function userAward(address) view returns (uint256)',
|
|
85
|
+
'function getUserStake(address) view returns (uint256)',
|
|
86
|
+
'function ownerAddr() view returns (address)',
|
|
87
|
+
'function isInitialized() view returns (bool)',
|
|
81
88
|
];
|
|
82
89
|
// ============================================================================
|
|
83
90
|
// 通用常量
|
|
@@ -38,6 +38,13 @@ export declare class IroPoolQuery {
|
|
|
38
38
|
status: boolean;
|
|
39
39
|
rate: bigint;
|
|
40
40
|
}>;
|
|
41
|
+
totalSupply(): Promise<bigint>;
|
|
42
|
+
balanceOf(account: string): Promise<bigint>;
|
|
43
|
+
lastPrice(): Promise<bigint>;
|
|
44
|
+
userAward(account: string): Promise<bigint>;
|
|
45
|
+
getUserStake(account: string): Promise<bigint>;
|
|
46
|
+
ownerAddr(): Promise<string>;
|
|
47
|
+
isInitialized(): Promise<boolean>;
|
|
41
48
|
get providerInstance(): JsonRpcProvider;
|
|
42
49
|
}
|
|
43
50
|
/**
|
|
@@ -62,6 +62,13 @@ export class IroPoolQuery {
|
|
|
62
62
|
const raw = await this.pool.increaseRateMap(index);
|
|
63
63
|
return { status: raw[0], rate: BigInt(raw[1]) };
|
|
64
64
|
}
|
|
65
|
+
async totalSupply() { return this.pool.totalSupply(); }
|
|
66
|
+
async balanceOf(account) { return this.pool.balanceOf(account); }
|
|
67
|
+
async lastPrice() { return this.pool.lastPrice(); }
|
|
68
|
+
async userAward(account) { return this.pool.userAward(account); }
|
|
69
|
+
async getUserStake(account) { return this.pool.getUserStake(account); }
|
|
70
|
+
async ownerAddr() { return this.pool.ownerAddr(); }
|
|
71
|
+
async isInitialized() { return this.pool.isInitialized(); }
|
|
65
72
|
get providerInstance() {
|
|
66
73
|
return this.provider;
|
|
67
74
|
}
|
|
@@ -18,7 +18,7 @@ export declare const ENI_IROSWAP_V2_FACTORY: "0xdE4360F6Cd386FD70Db1386F92013817
|
|
|
18
18
|
export declare const ENI_USDT: "0xDC1a8A35b0BaA3229b13f348ED708a2fd50b5e3a";
|
|
19
19
|
export declare const IRO_FACTORY_ABI: readonly ["function createProject(uint256 _projectID, uint256 _totalSupply, uint256 _initPrice, string memory _symbol, uint256[2] memory softAndHardCap, address coinAddr, uint256 pledgeDays, tuple(address account, uint256 quota)[] memory _addressList) returns (address pool)", "function projectIDToken(uint256) view returns (address)", "function getPool(address token) view returns (address poolAddress)", "function allToken(uint256) view returns (address token)", "function allTokensLength() view returns (uint256)", "function tokenInfo(address token) view returns (string name, uint256 totalSupply, uint256 initPrice, address creator, uint256 softCap, uint256 hardCap, bool isWhitelisted, uint256 pledgeDays)", "event CreateProject(uint256 indexed projectID, address indexed token, address indexed pool, address TKAAddr, uint256 len)"];
|
|
20
20
|
export declare const IRO_TOKEN_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function allowance(address owner, address spender) view returns (uint256)", "function approve(address spender, uint256 amount) returns (bool)", "function transfer(address to, uint256 amount) returns (bool)", "function transferFrom(address from, address to, uint256 amount) returns (bool)", "function subscribe(address _user, uint256 amount) payable", "function pledge(address _user, uint256 amount) payable", "function price() view returns (uint256)", "function creator() view returns (address)", "function isOpen() view returns (bool)", "function isWhitelisted() view returns (bool)", "function isWXOC() view returns (bool)", "function tradingLimit() view returns (uint256)", "function totalCreatorFee() view returns (uint256)", "function POOL() view returns (address)", "function TKA() view returns (address)", "function getTokenPrice() view returns (uint256 pairToken, uint256 pairTKA, uint256 newPrice)", "function dayProduce(uint256 day) view returns (bool)"];
|
|
21
|
-
export declare const IRO_POOL_ABI: readonly ["function pledge(address _user, uint256 amount, uint256 share) external", "function removePledge() external", "function extract(uint256 amount) external", "function transferAwards(address[] recipients, uint256[] TKAAmounts) external", "function token() view returns (address)", "function totalShare() view returns (uint256)", "function produceNum() view returns (uint256)", "function produceLpNum() view returns (uint256)", "function produceLimit() view returns (uint256)", "function lastAddProduce() view returns (uint256)", "function getDeposit(address account) view returns (uint256)", "function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)", "function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)", "function increaseRateMap(uint256) view returns (bool status, uint256 rate)"];
|
|
21
|
+
export declare const IRO_POOL_ABI: readonly ["function pledge(address _user, uint256 amount, uint256 share) external", "function removePledge() external", "function extract(uint256 amount) external", "function transferAwards(address[] recipients, uint256[] TKAAmounts) external", "function token() view returns (address)", "function totalShare() view returns (uint256)", "function produceNum() view returns (uint256)", "function produceLpNum() view returns (uint256)", "function produceLimit() view returns (uint256)", "function lastAddProduce() view returns (uint256)", "function getDeposit(address account) view returns (uint256)", "function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)", "function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)", "function increaseRateMap(uint256) view returns (bool status, uint256 rate)", "function totalSupply() view returns (uint256)", "function balanceOf(address) view returns (uint256)", "function lastPrice() view returns (uint256)", "function userAward(address) view returns (uint256)", "function getUserStake(address) view returns (uint256)", "function ownerAddr() view returns (address)", "function isInitialized() view returns (bool)"];
|
|
22
22
|
export declare const CREATE_PROJECT_GAS_LIMIT = 8000000n;
|
|
23
23
|
export declare const SUBSCRIBE_GAS_LIMIT = 3000000n;
|
|
24
24
|
export declare const POOL_OPERATION_GAS_LIMIT = 300000n;
|
|
@@ -78,6 +78,13 @@ export const IRO_POOL_ABI = [
|
|
|
78
78
|
'function getUserPledgeLpForUsdt(address _user) view returns (uint256 lpForUsdt)',
|
|
79
79
|
'function getLPValueForUSDTValue(uint256 targetTKAValue) view returns (uint256 valueInTKA)',
|
|
80
80
|
'function increaseRateMap(uint256) view returns (bool status, uint256 rate)',
|
|
81
|
+
'function totalSupply() view returns (uint256)',
|
|
82
|
+
'function balanceOf(address) view returns (uint256)',
|
|
83
|
+
'function lastPrice() view returns (uint256)',
|
|
84
|
+
'function userAward(address) view returns (uint256)',
|
|
85
|
+
'function getUserStake(address) view returns (uint256)',
|
|
86
|
+
'function ownerAddr() view returns (address)',
|
|
87
|
+
'function isInitialized() view returns (bool)',
|
|
81
88
|
];
|
|
82
89
|
// ============================================================================
|
|
83
90
|
// Gas Limits
|
|
@@ -23,6 +23,13 @@ export declare class IroPoolQuery {
|
|
|
23
23
|
status: boolean;
|
|
24
24
|
rate: bigint;
|
|
25
25
|
}>;
|
|
26
|
+
totalSupply(): Promise<bigint>;
|
|
27
|
+
balanceOf(account: string): Promise<bigint>;
|
|
28
|
+
lastPrice(): Promise<bigint>;
|
|
29
|
+
userAward(account: string): Promise<bigint>;
|
|
30
|
+
getUserStake(account: string): Promise<bigint>;
|
|
31
|
+
ownerAddr(): Promise<string>;
|
|
32
|
+
isInitialized(): Promise<boolean>;
|
|
26
33
|
get providerInstance(): JsonRpcProvider;
|
|
27
34
|
}
|
|
28
35
|
export declare function poolRemovePledge(params: IroPoolRemovePledgeParams): Promise<IroTxResult>;
|
|
@@ -29,6 +29,13 @@ export class IroPoolQuery {
|
|
|
29
29
|
const raw = await this.pool.increaseRateMap(index);
|
|
30
30
|
return { status: raw[0], rate: BigInt(raw[1]) };
|
|
31
31
|
}
|
|
32
|
+
async totalSupply() { return this.pool.totalSupply(); }
|
|
33
|
+
async balanceOf(account) { return this.pool.balanceOf(account); }
|
|
34
|
+
async lastPrice() { return this.pool.lastPrice(); }
|
|
35
|
+
async userAward(account) { return this.pool.userAward(account); }
|
|
36
|
+
async getUserStake(account) { return this.pool.getUserStake(account); }
|
|
37
|
+
async ownerAddr() { return this.pool.ownerAddr(); }
|
|
38
|
+
async isInitialized() { return this.pool.isInitialized(); }
|
|
32
39
|
get providerInstance() { return this.provider; }
|
|
33
40
|
}
|
|
34
41
|
// ============================================================================
|
|
@@ -98,7 +98,7 @@ export const TRANSFER_FEE_PER_ADDRESS = {
|
|
|
98
98
|
143: 1000000000000000n, // Monad: 0.001 MON
|
|
99
99
|
8453: 1000000000000000n, // Base: 0.001 ETH
|
|
100
100
|
2818: 1000000000000000n, // Morph: 0.001 ETH
|
|
101
|
-
173:
|
|
101
|
+
173: 100000000000000000n, // ENI: 0.1 EGAS
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
104
|
* 获取每个地址的转账费用(原生代币 wei)
|