From ceb8cca8dc46f68c1776b3f6fa269796cc972b00 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=A3=E5=BC=8F=E9=93=BE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=9C=B0=E5=9D=80=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/cfg_42161_release.js | 53 +++++++++++++++++++++++++++++++++ src/config/constants.ts | 5 ++-- src/data/allchain.ts | 16 ++++++++++ src/standards/JCStandard.ts | 2 +- 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 src/config/cfg_42161_release.js diff --git a/src/config/cfg_42161_release.js b/src/config/cfg_42161_release.js new file mode 100644 index 0000000..1cc470b --- /dev/null +++ b/src/config/cfg_42161_release.js @@ -0,0 +1,53 @@ +module.exports = { + tokens: [ + { + type: 'eth', + address: 'eth', + symbol: 'ETH', + decimal: 18, + }, + { + type: 'erc20', + address: '0x741482aE1480E552735E44Ff3A733448AcBbeD8d', + symbol: 'CEG', + decimal: 18, + }, + { + address: '0x79fc2a4216A1e595DBD09D13c4B4bD3B095d5bb2', + name: 'hero', + type: 'erc721', + }, + { + address: '0x551838d7754157D13e7D945b8a37bBD6Ad50dDC7', + name: 'chip', + type: 'erc721', + }, + { + address: '0xD728de3d9ebeD90E84aBe84539280cbC5b18E304', + name: 'genesis', + type: 'erc721', + }, + { + address: '0x3F13F83E6363D97d0353cAAfACA08B05D9BF3637', + name: 'gacha', + type: 'erc721', + }, + ], + contracts: { + minterFactory: '0x24499444b2BE6A8E3F800D47E4Ed0c36B5c0747e', + nftmarket: '0xA683c7BC5f3c73782fce9fc614Fda7C999934db8', + nftmall: '0xb5EF2FAC11c385041f847E34E0b1B4740436f769', + gamemarket: '0x6232d2B720C22D6BCB633560b05002C472a64f18', + gamemall: '0x1Ee01D949C848aF1ceDb80165b290554937819d9', + }, + gasInfo: { + nftApprove: 49340, + cecApprove: 46962, + marketSellNFT: 270740, + marketCancelOrder: 119027, + marketUpdatePrice: 41272, + marketBuy: 207735, + gameMallBuy: 119416, + gameMarketBuy: 133251, + }, +}; diff --git a/src/config/constants.ts b/src/config/constants.ts index eb5c4d4..41affc0 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -1,10 +1,9 @@ export const WALLET_STORAGE_KEY_NAME = 'jc_wallet_data'; -// export const WALLET_API_HOST = "https://wallet.cebggame.com"; // export const WALLET_API_HOST = 'http://192.168.100.183:3007'; // export const PAY_API_HOST = 'http://192.168.100.183:3007'; -export const WALLET_API_HOST = 'https://pay.cebggame.com'; -export const PAY_API_HOST = 'https://pay.cebggame.com/v1'; +export const WALLET_API_HOST = 'https://wallet.cebggame.com'; +export const PAY_API_HOST = 'https://pay.cebggame.com/v2'; export const MAX_TRY_COUNT = 6; diff --git a/src/data/allchain.ts b/src/data/allchain.ts index c419d1b..4b3f6a0 100644 --- a/src/data/allchain.ts +++ b/src/data/allchain.ts @@ -282,6 +282,22 @@ export const AllChains = [ symbol: 'ONE', explorerurl: 'https://explorer.harmony.one', }, + { + name: 'zkSync Era Mainnet', + type: 'Mainnet', + rpc: 'https://mainnet.era.zksync.io', + id: 324, + symbol: 'ETH', + explorerurl: 'https://explorer.zksync.io', + }, + { + name: 'zkSync Era Testnet', + type: 'Testnet', + rpc: 'https://testnet.era.zksync.dev', + id: 280, + symbol: 'ETH', + explorerurl: 'https://goerli.explorer.zksync.io', + }, { name: 'Local Testnet', type: 'Local', diff --git a/src/standards/JCStandard.ts b/src/standards/JCStandard.ts index d6823ea..39f60d1 100644 --- a/src/standards/JCStandard.ts +++ b/src/standards/JCStandard.ts @@ -275,7 +275,7 @@ export class JCStandard { await tokenInstance.methods.approve(addressMarket, price).send({ gas: gasApprove, gasPrice }); } if (!gas) { - gas = await contract.methods.buy(orderId).estimateGas(); + gas = await contract.methods.buy(orderId, price).estimateGas(); } gas = (gas * GAS_BOOST) | 1; // begin of increase allowance