Skip to content

Commit

Permalink
Merge pull request #110 from Polymarket/feat/amoy-migration
Browse files Browse the repository at this point in the history
Replacing `mumbai` with `amoy`
  • Loading branch information
poly-rodr authored Apr 11, 2024
2 parents 003446f + 829af1d commit d045dc6
Show file tree
Hide file tree
Showing 50 changed files with 101 additions and 101 deletions.
2 changes: 1 addition & 1 deletion examples/GTDOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
10 changes: 5 additions & 5 deletions examples/approveAllowances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function getWallet(mainnetQ: boolean): ethers.Wallet {
if (mainnetQ) {
rpcUrl = `https://polygon-mainnet.g.alchemy.com/v2/${rpcToken}`;
} else {
rpcUrl = `https://polygon-mumbai.g.alchemy.com/v2/${rpcToken}`;
rpcUrl = `https://polygon-amoy.g.alchemy.com/v2/${rpcToken}`;
}
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
let wallet = new ethers.Wallet(pk);
Expand All @@ -24,24 +24,24 @@ export function getWallet(mainnetQ: boolean): ethers.Wallet {
}

export function getUsdcContract(mainnetQ: boolean, wallet: ethers.Wallet): ethers.Contract {
const chainId = mainnetQ ? 137 : 80001;
const chainId = mainnetQ ? 137 : 80002;
const contractConfig = getContractConfig(chainId);
return new ethers.Contract(contractConfig.collateral, usdcAbi, wallet);
}

export function getCtfContract(mainnetQ: boolean, wallet: ethers.Wallet): ethers.Contract {
const chainId = mainnetQ ? 137 : 80001;
const chainId = mainnetQ ? 137 : 80002;
const contractConfig = getContractConfig(chainId);
return new ethers.Contract(contractConfig.conditionalTokens, ctfAbi, wallet);
}

async function main() {
// --------------------------
// SET MAINNET OR MUMBAI HERE
// SET MAINNET OR AMOY HERE
const isMainnet = false;
// --------------------------
const wallet = getWallet(isMainnet);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const contractConfig = getContractConfig(chainId);
Expand Down
10 changes: 5 additions & 5 deletions examples/approveNegRiskAllowances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getWallet(mainnetQ: boolean): ethers.Wallet {
if (mainnetQ) {
rpcUrl = `https://polygon-mainnet.g.alchemy.com/v2/${rpcToken}`;
} else {
rpcUrl = `https://polygon-mumbai.g.alchemy.com/v2/${rpcToken}`;
rpcUrl = `https://polygon-amoy.g.alchemy.com/v2/${rpcToken}`;
}
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
let wallet = new ethers.Wallet(pk);
Expand All @@ -29,24 +29,24 @@ export function getWallet(mainnetQ: boolean): ethers.Wallet {
}

export function getUsdcContract(mainnetQ: boolean, wallet: ethers.Wallet): ethers.Contract {
const chainId = mainnetQ ? 137 : 80001;
const chainId = mainnetQ ? 137 : 80002;
const contractConfig = getContractConfig(chainId);
return new ethers.Contract(contractConfig.collateral, usdcAbi, wallet);
}

export function getCtfContract(mainnetQ: boolean, wallet: ethers.Wallet): ethers.Contract {
const chainId = mainnetQ ? 137 : 80001;
const chainId = mainnetQ ? 137 : 80002;
const contractConfig = getContractConfig(chainId);
return new ethers.Contract(contractConfig.conditionalTokens, ctfAbi, wallet);
}

async function main() {
// --------------------------
// SET MAINNET OR MUMBAI HERE
// SET MAINNET OR AMOY HERE
const isMainnet = false;
// --------------------------
const wallet = getWallet(isMainnet);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const contractConfig = getContractConfig(chainId);
Expand Down
2 changes: 1 addition & 1 deletion examples/areOrdersScoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/cancelAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/cancelMarketOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/cancelOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/cancelOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/createApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/createOrDeriveApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/deleteApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/deriveApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/dropNofications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/geoToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const geoBlockToken = process.env.GEO_BLOCK_TOKEN; // the geo block token
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

Expand Down
2 changes: 1 addition & 1 deletion examples/getApiKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getBalanceAllowance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getLargeOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getLastTradePrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getLastTradesPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getMarketTradesEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const clobClient = new ClobClient(host, chainId);

console.log("events", await clobClient.getMarketTradesEvents("condition_id"));
Expand Down
2 changes: 1 addition & 1 deletion examples/getMarkets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const clobClient = new ClobClient(host, chainId);

console.log("market", await clobClient.getMarket("condition_id"));
Expand Down
2 changes: 1 addition & 1 deletion examples/getMidPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getMidPoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getNofications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getOpenOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getOrderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const clobClient = new ClobClient(host, chainId);
const YES = "1343197538147866997676250008839231694243646439454152539053893078719042421992";

Expand Down
2 changes: 1 addition & 1 deletion examples/getOrderbooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const clobClient = new ClobClient(host, chainId);

const YES = "1343197538147866997676250008839231694243646439454152539053893078719042421992";
Expand Down
2 changes: 1 addition & 1 deletion examples/getPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getPricesHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/getServerTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
const clobClient = new ClobClient(host, chainId);

console.log(`Server time: ${await clobClient.getServerTime()}`);
Expand Down
2 changes: 1 addition & 1 deletion examples/getTrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/isOrderScoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/marketOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/matchOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
2 changes: 1 addition & 1 deletion examples/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenvConfig({ path: resolve(__dirname, "../.env") });

async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

const host = process.env.CLOB_API_URL || "http://localhost:8080";
Expand Down
Loading

0 comments on commit d045dc6

Please sign in to comment.