From d13f600ef21eb9549c8059e03da7c3a829e1dbce Mon Sep 17 00:00:00 2001 From: James Jia - Test Date: Wed, 6 Dec 2023 15:57:31 -0500 Subject: [PATCH] 0.18.0: add sepolia --- __tests__/FactRegistry.test.ts | 2 +- __tests__/Logs.test.ts | 2 +- __tests__/StarkwareLib.test.ts | 6 +- package-lock.json | 74 +++++++++++----------- package.json | 2 +- src/clients/zeroEx.ts | 1 + src/contracts/fact-registry-abi.json | 4 ++ src/contracts/mintable-token-abi.json | 4 ++ src/contracts/proxy-deposit-abi.json | 4 ++ src/contracts/starkware-perpetual-abi.json | 4 ++ src/contracts/usdc-abi.json | 4 ++ src/contracts/usdc-exchange-proxy-abi.json | 4 ++ src/lib/Constants.ts | 4 ++ src/types.ts | 1 + 14 files changed, 73 insertions(+), 43 deletions(-) diff --git a/__tests__/FactRegistry.test.ts b/__tests__/FactRegistry.test.ts index 14f58b0..12b3d0e 100644 --- a/__tests__/FactRegistry.test.ts +++ b/__tests__/FactRegistry.test.ts @@ -10,7 +10,7 @@ let starkwareLib: StarkwareLib; describe('FactRegistry', () => { beforeAll(() => { - starkwareLib = new StarkwareLib(dummyProvider, Networks.GOERLI); + starkwareLib = new StarkwareLib(dummyProvider, Networks.SEPOLIA); }); describe('getTransferErc20Fact', () => { diff --git a/__tests__/Logs.test.ts b/__tests__/Logs.test.ts index bde825e..aeb0f25 100644 --- a/__tests__/Logs.test.ts +++ b/__tests__/Logs.test.ts @@ -21,7 +21,7 @@ const defaultLog = { describe('Logs', () => { beforeAll(() => { - starkwareLib = new StarkwareLib(dummyProvider, Networks.GOERLI); + starkwareLib = new StarkwareLib(dummyProvider, Networks.SEPOLIA); }); it('Successfully parses transfer logs', () => { diff --git a/__tests__/StarkwareLib.test.ts b/__tests__/StarkwareLib.test.ts index c3bff12..5a39487 100644 --- a/__tests__/StarkwareLib.test.ts +++ b/__tests__/StarkwareLib.test.ts @@ -9,8 +9,8 @@ import { DummyProvider } from './helpers/DummyProvider'; describe('StarwareLib#initiate', () => { const dummyProvider = new DummyProvider() as unknown as Provider; - it('Successfully initiates StarkwareLib on Goerli', async () => { - const starkwareLib = new StarkwareLib(dummyProvider, Networks.GOERLI); + it('Successfully initiates StarkwareLib on Sepolia', async () => { + const starkwareLib = new StarkwareLib(dummyProvider, Networks.SEPOLIA); expect(starkwareLib.collateralToken).toBeTruthy(); expect(starkwareLib.contracts).toBeTruthy(); expect(starkwareLib.exchange).toBeTruthy(); @@ -24,7 +24,7 @@ describe('StarwareLib#initiate', () => { { timeout: 10000 }, ); - const real = new StarkwareLib(realProvider, Networks.GOERLI); + const real = new StarkwareLib(realProvider, Networks.SEPOLIA); const account = real.web3.eth.accounts.privateKeyToAccount(process.env.PRIVATE_KEY as string); real.web3.eth.accounts.wallet.add(account); real.web3.eth.defaultAccount = account.address; diff --git a/package-lock.json b/package-lock.json index 29a5f84..9c7d5e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/starkex-eth", - "version": "0.17.0", + "version": "0.18.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1742,7 +1742,7 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-includes": { "version": "3.1.4", @@ -2286,7 +2286,7 @@ "buffer-to-arraybuffer": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==" + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" }, "buffer-xor": { "version": "1.0.3", @@ -2664,7 +2664,7 @@ "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "cookiejar": { "version": "2.1.4", @@ -3071,7 +3071,7 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { "version": "1.4.75", @@ -3132,7 +3132,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "end-of-stream": { "version": "1.4.4", @@ -3212,7 +3212,7 @@ "es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "requires": { "d": "1", "es5-ext": "^0.10.35", @@ -3243,7 +3243,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, "escape-string-regexp": { "version": "4.0.0", @@ -3712,12 +3712,12 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "eth-ens-namehash": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw==", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", "requires": { "idna-uts46-hx": "^2.3.1", "js-sha3": "^0.5.7" @@ -3726,7 +3726,7 @@ "js-sha3": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==" + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" } } }, @@ -3846,7 +3846,7 @@ "ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", "requires": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" @@ -3855,7 +3855,7 @@ "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" } } }, @@ -4345,7 +4345,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "fs-extra": { "version": "4.0.3", @@ -4738,7 +4738,7 @@ "http-https": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==" + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" }, "http-proxy-agent": { "version": "4.0.1", @@ -4839,7 +4839,7 @@ "punycode": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==" + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" } } }, @@ -6010,7 +6010,7 @@ "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { "graceful-fs": "^4.1.6" } @@ -6201,12 +6201,12 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, "merge-stream": { "version": "2.0.0", @@ -6223,7 +6223,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, "micromatch": { "version": "4.0.4", @@ -6283,7 +6283,7 @@ "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "requires": { "dom-walk": "^0.1.0" } @@ -6359,7 +6359,7 @@ "mkdirp-promise": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w==", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", "requires": { "mkdirp": "*" } @@ -6415,7 +6415,7 @@ "nano-json-stream-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew==" + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" }, "nanomatch": { "version": "1.2.13", @@ -6620,7 +6620,7 @@ "number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", "requires": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -6629,7 +6629,7 @@ "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" } } }, @@ -6647,7 +6647,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", @@ -6746,7 +6746,7 @@ "oboe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", "requires": { "http-https": "^1.0.0" } @@ -6933,7 +6933,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "path-type": { "version": "4.0.0", @@ -7068,7 +7068,7 @@ "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "progress": { "version": "2.0.3", @@ -8245,7 +8245,7 @@ "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==" + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, "string-length": { "version": "4.0.2", @@ -8593,7 +8593,7 @@ "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==" + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" }, "tmpl": { "version": "1.0.5", @@ -8831,7 +8831,7 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "unset-value": { "version": "1.0.0", @@ -8920,7 +8920,7 @@ "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==" + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" }, "use": { "version": "3.1.1", @@ -8968,7 +8968,7 @@ "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { "version": "3.4.0", @@ -9018,7 +9018,7 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "verror": { "version": "1.10.0", @@ -9573,7 +9573,7 @@ "xhr2-cookies": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g==", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", "requires": { "cookiejar": "^2.1.1" } @@ -9604,7 +9604,7 @@ "yaeti": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==" + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" }, "yallist": { "version": "3.1.1", diff --git a/package.json b/package.json index 90fab78..6f24f27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/starkex-eth", - "version": "0.17.0", + "version": "0.18.0", "description": "Cryptographic functions for use with StarkEx", "main": "build/src/index.js", "scripts": { diff --git a/src/clients/zeroEx.ts b/src/clients/zeroEx.ts index a7e06f3..8a86e56 100644 --- a/src/clients/zeroEx.ts +++ b/src/clients/zeroEx.ts @@ -11,6 +11,7 @@ const zeroExUrlMap: { [networkId: number]: string } = { [Networks.MAINNET]: 'https://api.0x.org/swap/v1/quote', [Networks.ROPSTEN]: 'https://ropsten.api.0x.org/swap/v1/quote', [Networks.GOERLI]: 'https://goerli.api.0x.org/swap/v1/quote', + [Networks.SEPOLIA]: 'https://sepolia.api.0x.org/swap/v1/quote', }; const ZERO_EX_API_KEY_HEADER = '0x-api-key'; diff --git a/src/contracts/fact-registry-abi.json b/src/contracts/fact-registry-abi.json index 927a1f7..9362001 100644 --- a/src/contracts/fact-registry-abi.json +++ b/src/contracts/fact-registry-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0xc5061C08cF892C79DDB106B777138982433C8865" + }, + "11155111": { + "links": {}, + "address": "0xCD828e691cA23b66291ae905491Bb89aEe3Abd82" } }, "abi": [ diff --git a/src/contracts/mintable-token-abi.json b/src/contracts/mintable-token-abi.json index c9294e1..b7f1d94 100644 --- a/src/contracts/mintable-token-abi.json +++ b/src/contracts/mintable-token-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0xF7a2fa2c2025fFe64427dd40Dc190d47ecC8B36e" + }, + "11155111": { + "links": {}, + "address": "0x7fC9C132268E0E414991449c003DbdB3E73E2059" } }, "abi": [ diff --git a/src/contracts/proxy-deposit-abi.json b/src/contracts/proxy-deposit-abi.json index 917dd33..52bf583 100644 --- a/src/contracts/proxy-deposit-abi.json +++ b/src/contracts/proxy-deposit-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0xbB2Ebb1EE6486deC6b2F569983CcfAe8Ea11e5ca" + }, + "11155111": { + "links": {}, + "address": "0x69ebf65bfCa20E45E19a1Ae5c69BAfAF536192f2" } }, "abi": [ diff --git a/src/contracts/starkware-perpetual-abi.json b/src/contracts/starkware-perpetual-abi.json index 9de0364..2acabe7 100644 --- a/src/contracts/starkware-perpetual-abi.json +++ b/src/contracts/starkware-perpetual-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0xFE76edf35648Cc733d57200646cb1Dc63d05462F" + }, + "11155111": { + "links": {}, + "address": "0x3D05aaCd0fED84f65dE0D91e4621298E702911E2" } }, "abi": [ diff --git a/src/contracts/usdc-abi.json b/src/contracts/usdc-abi.json index c973cd0..fbdd6eb 100644 --- a/src/contracts/usdc-abi.json +++ b/src/contracts/usdc-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0xF7a2fa2c2025fFe64427dd40Dc190d47ecC8B36e" + }, + "11155111": { + "links": {}, + "address": "0x7fC9C132268E0E414991449c003DbdB3E73E2059" } }, "abi": [ diff --git a/src/contracts/usdc-exchange-proxy-abi.json b/src/contracts/usdc-exchange-proxy-abi.json index c4f9600..db7a7d3 100644 --- a/src/contracts/usdc-exchange-proxy-abi.json +++ b/src/contracts/usdc-exchange-proxy-abi.json @@ -11,6 +11,10 @@ "5": { "links": {}, "address": "0x78809e1619d20662D2227735ea03d6bcC82f616a" + }, + "11155111": { + "links": {}, + "address": "0xA2e0B371d8C18ef436f55F6DC214daCaf3169315" } }, "abi": [ diff --git a/src/lib/Constants.ts b/src/lib/Constants.ts index 50c47b7..c413013 100644 --- a/src/lib/Constants.ts +++ b/src/lib/Constants.ts @@ -17,6 +17,7 @@ export const COLLATERAL_ASSET_ID = { [Networks.MAINNET]: getAssetId(usdcAbi.networks[1].address), [Networks.ROPSTEN]: getAssetId(usdcAbi.networks[3].address), [Networks.GOERLI]: getAssetId(usdcAbi.networks[5].address), + [Networks.SEPOLIA]: getAssetId(usdcAbi.networks[11155111].address), }; export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; @@ -25,10 +26,13 @@ export const USDC_ADDRESSES: {[networkId: number]: string } = { [Networks.MAINNET]: usdcAbi.networks[1].address, [Networks.ROPSTEN]: usdcAbi.networks[3].address, [Networks.GOERLI]: usdcAbi.networks[5].address, + [Networks.SEPOLIA]: usdcAbi.networks[11155111].address, + }; export const USDC_EXCHANGE_ADDRESSES: {[networkId: number]: string} = { [Networks.MAINNET]: usdcExchangeProxyAbi.networks[1].address, [Networks.ROPSTEN]: usdcExchangeProxyAbi.networks[3].address, [Networks.GOERLI]: usdcExchangeProxyAbi.networks[5].address, + [Networks.SEPOLIA]: usdcExchangeProxyAbi.networks[11155111].address, }; diff --git a/src/types.ts b/src/types.ts index 2c6a31e..5b524b8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,6 +17,7 @@ export const Networks = { ROPSTEN: 3, GOERLI: 5, KOVAN: 42, + SEPOLIA: 11155111, }; export interface TxResult {