diff --git a/src/Notional.ts b/src/Notional.ts index 5687760..6c12673 100644 --- a/src/Notional.ts +++ b/src/Notional.ts @@ -36,6 +36,7 @@ try { /* Endpoints */ const kovanAddresses = require('./config/kovan.json'); +const goerliAddresses = require('./config/goerli.json'); const mainnetAddresses = require('./config/mainnet.json'); const graphEndpoints = require('./config/graph.json'); @@ -76,6 +77,11 @@ export default class Notional extends TransactionBuilder { graphEndpoint = graphEndpoints['mainnet:http']; pollInterval = Number(graphEndpoints['mainnet:poll']); break; + case 5: + addresses = goerliAddresses; + graphEndpoint = graphEndpoints['goerli:http']; + pollInterval = Number(graphEndpoints['goerli:poll']); + break; case 42: addresses = kovanAddresses; graphEndpoint = graphEndpoints['kovan:http']; diff --git a/src/config/constants.ts b/src/config/constants.ts index b2db49d..ce57889 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -35,6 +35,8 @@ export function secondsPerBlock(chainId: number) { switch (chainId) { case 1: return 13; + case 5: + return 15; case 42: return 4; default: diff --git a/src/config/goerli.json b/src/config/goerli.json new file mode 100644 index 0000000..903107a --- /dev/null +++ b/src/config/goerli.json @@ -0,0 +1,10 @@ +{ + "chainId": 5, + "deployer": "0x2a956Fe94ff89D8992107c8eD4805c30ff1106ef", + "governor": "0x10d1Ca9BcD1Fb2b7d5ecB9A53a348292ee38E524", + "guardian": "0x2a956Fe94ff89D8992107c8eD4805c30ff1106ef", + "networkName": "goerli", + "note": "0xC5e91B01F9B23952821410Be7Aa3c45B6429C670", + "notional": "0xD8229B55bD73c61D840d339491219ec6Fa667B0a", + "startBlock": 6362131 +} diff --git a/src/config/graph.json b/src/config/graph.json index 778767d..5edc2b1 100644 --- a/src/config/graph.json +++ b/src/config/graph.json @@ -3,6 +3,8 @@ "local:poll": 5000, "kovan:http": "https://api.thegraph.com/subgraphs/name/notional-finance/kovan-v2", "kovan:poll": 5000, + "goerli:http": "https://api.thegraph.com/subgraphs/name/notional-finance/goerli-v2", + "goerli:poll": 5000, "mainnet:http": "https://api.thegraph.com/subgraphs/name/notional-finance/mainnet-v2", "mainnet:poll": 7000 -} \ No newline at end of file +} diff --git a/src/system/datasource/Cache.ts b/src/system/datasource/Cache.ts index ae0bb3f..369526d 100644 --- a/src/system/datasource/Cache.ts +++ b/src/system/datasource/Cache.ts @@ -22,6 +22,9 @@ export default class Cache extends DataSource { case 1: this.cacheURL = 'https://api.notional.finance/v1/system'; break; + case 5: + this.cacheURL = 'https://goerli.api.notional.finance/v1/system'; + break; case 42: this.cacheURL = 'https://kovan.api.notional.finance/v1/system'; break;