Skip to content

Commit

Permalink
0.18.0: add sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajames committed Dec 6, 2023
1 parent 0fafb35 commit d13f600
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 43 deletions.
2 changes: 1 addition & 1 deletion __tests__/FactRegistry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let starkwareLib: StarkwareLib;
describe('FactRegistry', () => {

beforeAll(() => {
starkwareLib = new StarkwareLib(dummyProvider, Networks.GOERLI);
starkwareLib = new StarkwareLib(dummyProvider, Networks.SEPOLIA);
});

describe('getTransferErc20Fact', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/Logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/StarkwareLib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand Down
74 changes: 37 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
1 change: 1 addition & 0 deletions src/clients/zeroEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/fact-registry-abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"5": {
"links": {},
"address": "0xc5061C08cF892C79DDB106B777138982433C8865"
},
"11155111": {
"links": {},
"address": "0xCD828e691cA23b66291ae905491Bb89aEe3Abd82"
}
},
"abi": [
Expand Down
Loading

0 comments on commit d13f600

Please sign in to comment.