Skip to content

Commit

Permalink
update scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
hskang9 committed Aug 30, 2024
1 parent 2289950 commit 4eada8a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 24 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@standardweb3/default-token-list",
"version": "0.0.24",
"version": "0.0.25",
"description": "Standard default token list",
"main": "build/standard-default.tokenlist.json",
"scripts": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"homepage": "https://github.com/standardweb3/default-token-list#readme",
"devDependencies": {
"@ethersproject/address": "^5.0.2",
"@standardweb3/market-lists": "0.0.2",
"@standardweb3/market-lists": "0.0.4",
"@uniswap/token-list-bridge-utils": "^2.3.0",
"ajv": "^6.12.3",
"chai": "^4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/buildList.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ module.exports = function buildList() {
startBlock: 6513267,
},
Scroll: {
address: "0xd7ABA1cbAd246249be6a0de9a449FB5EDEFf1E47",
startBlock: 8734538,
address: "0x3828a06c0D78e33e77d4B8B1c9B16c1214C3071B",
startBlock: 8849622,
},
"Neon EVM MainNet": {
address: "0xd7ABA1cbAd246249be6a0de9a449FB5EDEFf1E47",
Expand Down
18 changes: 9 additions & 9 deletions src/pairs/neon.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x7b9f9033afcf602b556a7aeac5871a52b56a06ee",
"address": "0x7b9f9033aFCF602B556a7aeAC5871a52b56a06ee",
"symbol": "JSOL",
"name": "JPool Staked SOL",
"decimals": 9,
Expand All @@ -847,7 +847,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x7b9f9033afcf602b556a7aeac5871a52b56a06ee",
"address": "0x7b9f9033aFCF602B556a7aeAC5871a52b56a06ee",
"symbol": "JSOL",
"name": "JPool Staked SOL",
"decimals": 9,
Expand All @@ -867,7 +867,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x7b9f9033afcf602b556a7aeac5871a52b56a06ee",
"address": "0x7b9f9033aFCF602B556a7aeAC5871a52b56a06ee",
"symbol": "JSOL",
"name": "JPool Staked SOL",
"decimals": 9,
Expand Down Expand Up @@ -1123,7 +1123,7 @@
{
"base": {
"chainId": 245022934,
"address": "0xb89c62e960457d1d2c5f20135bedfd215d2466de",
"address": "0xB89c62E960457D1d2c5f20135bEdfD215D2466DE",
"symbol": "POPCAT",
"name": "POPCAT",
"decimals": 9,
Expand All @@ -1142,7 +1142,7 @@
{
"base": {
"chainId": 245022934,
"address": "0xb89c62e960457d1d2c5f20135bedfd215d2466de",
"address": "0xB89c62E960457D1d2c5f20135bEdfD215D2466DE",
"symbol": "POPCAT",
"name": "POPCAT",
"decimals": 9,
Expand All @@ -1162,7 +1162,7 @@
{
"base": {
"chainId": 245022934,
"address": "0xb89c62e960457d1d2c5f20135bedfd215d2466de",
"address": "0xB89c62E960457D1d2c5f20135bEdfD215D2466DE",
"symbol": "POPCAT",
"name": "POPCAT",
"decimals": 9,
Expand All @@ -1182,7 +1182,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x663572b924db12e0e3822c6160df29154630c8e3",
"address": "0x663572b924Db12E0e3822C6160Df29154630c8e3",
"symbol": "WHALE",
"name": "WHALEBERT",
"decimals": 8,
Expand All @@ -1201,7 +1201,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x663572b924db12e0e3822c6160df29154630c8e3",
"address": "0x663572b924Db12E0e3822C6160Df29154630c8e3",
"symbol": "WHALE",
"name": "WHALEBERT",
"decimals": 8,
Expand All @@ -1221,7 +1221,7 @@
{
"base": {
"chainId": 245022934,
"address": "0x663572b924db12e0e3822c6160df29154630c8e3",
"address": "0x663572b924Db12E0e3822C6160Df29154630c8e3",
"symbol": "WHALE",
"name": "WHALEBERT",
"decimals": 8,
Expand Down
12 changes: 8 additions & 4 deletions src/scripts/addPairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ async function addPair(pair, matchingEngine, walletClient, abi) {
}

async function setSpread(pair, matchingEngine, walletClient, abi) {
if(pair.buy_tick === undefined && pair.sell_tick === undefined) {
console.log("Spread already set");
return;
}
try {
// Set up ticks for listed pair
const result2 = await walletClient.writeContract({
Expand All @@ -64,16 +68,16 @@ async function main() {
const account = privateKeyToAccount(process.env.ADMIN_PRIVATE_KEY);
const walletClient = createWalletClient({
account,
chain: neonMainnet,
transport: http(process.env.NEON_RPC),
chain: scroll,
transport: http(process.env.SCROLL_RPC),
});

const abi = MatchingEngineABI;

const pairs = await getPairs("Neon EVM MainNet");
const pairs = await getPairs("Scroll");
// make contract call on each pair in the list
const matchingEngine =
defaultTokenList.matchingEngine["Neon EVM MainNet"].address;
defaultTokenList.matchingEngine["Scroll"].address;

for (const pair of pairs) {
await addPair(pair, matchingEngine, walletClient, abi);
Expand Down
6 changes: 3 additions & 3 deletions src/tokens/neon.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
{
"chainId": 245022934,
"address_spl": "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn",
"address": "0x7b9f9033afcf602b556a7aeac5871a52b56a06ee",
"address": "0x7b9f9033aFCF602B556a7aeAC5871a52b56a06ee",
"decimals": 9,
"name": "JPool Staked SOL",
"symbol": "JSOL",
Expand Down Expand Up @@ -199,7 +199,7 @@
{
"chainId": 245022934,
"address_spl": "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr",
"address": "0xb89c62e960457d1d2c5f20135bedfd215d2466de",
"address": "0xB89c62E960457D1d2c5f20135bEdfD215D2466DE",
"decimals": 9,
"name": "POPCAT",
"symbol": "POPCAT",
Expand All @@ -208,7 +208,7 @@
{
"chainId": 245022934,
"address_spl": "9uhHjyfc5tKdaZnjstLLKoLGcF889ub8zX9wtwhtzgK6",
"address": "0x663572b924db12e0e3822c6160df29154630c8e3",
"address": "0x663572b924Db12E0e3822C6160Df29154630c8e3",
"decimals": 8,
"name": "WHALEBERT",
"symbol": "WHALE",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==

"@standardweb3/[email protected].2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@standardweb3/market-lists/-/market-lists-0.0.2.tgz#6e9e47e81a9a257ce876399a45b51e5752c1fab8"
integrity sha512-phinTzWrDhIrZM5hdRNbNUj1iQZHz0ONszRxA446ltK5sOiANQSZTmcg4UDs8z9gaFjKrvfzFVQKBh7LaIiBlg==
"@standardweb3/[email protected].4":
version "0.0.4"
resolved "https://registry.yarnpkg.com/@standardweb3/market-lists/-/market-lists-0.0.4.tgz#14cce0787ea8d169610bd7b316c46428a994f8dc"
integrity sha512-nEXQhN0nRZWPOjgr5NkD8Qw2UxjZaW5msuBvCeQfKwfDa3QrLjMYXLiDsYECi0S9kaXmUPyAvn6jXPds5fTESA==

"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
Expand Down

0 comments on commit 4eada8a

Please sign in to comment.