diff --git a/packages/boba/subgraph/L2/config/arbitrum-goerli.json b/packages/boba/subgraph/L2/config/arbitrum-goerli.json new file mode 100644 index 0000000000..7d07809115 --- /dev/null +++ b/packages/boba/subgraph/L2/config/arbitrum-goerli.json @@ -0,0 +1,26 @@ +{ + "network": "arbitrum-goerli", + "contracts": { + "L2LiquidityPool": { + "address": "0x0000000000000000000000000000000000000000" + }, + "OVM_L2StandardBridge": { + "address": "0x0000000000000000000000000000000000000000" + }, + "GovernorBravoDelegate": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Boba_GasPriceOracle": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringHelperFactory": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringMonsters": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Teleportation": { + "address": "0x7063f59e1Db3e505D844d11A71C78F92D39E5963" + } + } +} diff --git a/packages/boba/subgraph/L2/config/goerli-l1.json b/packages/boba/subgraph/L2/config/bnb-testnet.json similarity index 87% rename from packages/boba/subgraph/L2/config/goerli-l1.json rename to packages/boba/subgraph/L2/config/bnb-testnet.json index 7ba6554c74..452477a3bc 100644 --- a/packages/boba/subgraph/L2/config/goerli-l1.json +++ b/packages/boba/subgraph/L2/config/bnb-testnet.json @@ -1,5 +1,5 @@ { - "network": "goerli", + "network": "chapel", "contracts": { "L2LiquidityPool": { "address": "0x0000000000000000000000000000000000000000" @@ -15,12 +15,12 @@ }, "TuringHelperFactory": { "address": "0x0000000000000000000000000000000000000000" - }, + }, "TuringMonsters": { "address": "0x0000000000000000000000000000000000000000" }, "Teleportation": { - "address": "0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13" + "address": "0x7f6a32bCaA70c65E08F2f221737612F6fC18347A" } } } diff --git a/packages/boba/subgraph/L2/config/boba-bnb-testnet.json b/packages/boba/subgraph/L2/config/boba-bnb-testnet.json new file mode 100644 index 0000000000..236d36f04d --- /dev/null +++ b/packages/boba/subgraph/L2/config/boba-bnb-testnet.json @@ -0,0 +1,26 @@ +{ + "network": "boba-bnb-testnet", + "contracts": { + "L2LiquidityPool": { + "address": "0x0000000000000000000000000000000000000000" + }, + "OVM_L2StandardBridge": { + "address": "0x0000000000000000000000000000000000000000" + }, + "GovernorBravoDelegate": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Boba_GasPriceOracle": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringHelperFactory": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringMonsters": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Teleportation": { + "address": "0xf4d179d3a083Fa3Eede935FaF4C679D32d514186" + } + } +} diff --git a/packages/boba/subgraph/L2/config/mainnet.json b/packages/boba/subgraph/L2/config/boba-eth-mainnet.json similarity index 96% rename from packages/boba/subgraph/L2/config/mainnet.json rename to packages/boba/subgraph/L2/config/boba-eth-mainnet.json index 4cd79ab7ab..6b492a1571 100644 --- a/packages/boba/subgraph/L2/config/mainnet.json +++ b/packages/boba/subgraph/L2/config/boba-eth-mainnet.json @@ -1,5 +1,5 @@ { - "network": "boba", + "network": "boba-eth", "contracts": { "L2LiquidityPool": { "address": "0x3A92cA39476fF84Dc579C868D4D7dE125513B034" diff --git a/packages/boba/subgraph/L2/config/boba-goerli.json b/packages/boba/subgraph/L2/config/boba-goerli.json new file mode 100644 index 0000000000..3370ea7de7 --- /dev/null +++ b/packages/boba/subgraph/L2/config/boba-goerli.json @@ -0,0 +1,26 @@ +{ + "network": "boba-goerli", + "contracts": { + "L2LiquidityPool": { + "address": "0x8d3866a79aA780BA3DC1a300a1567635F3754a0e" + }, + "OVM_L2StandardBridge": { + "address": "0x4200000000000000000000000000000000000010" + }, + "GovernorBravoDelegate": { + "address": "0x472e5C097C790c6a44366a89a987Ec996A4d83e0" + }, + "Boba_GasPriceOracle": { + "address": "0x7F974A09a251dEA6b75af3e0A0e29D1133DaCf4b" + }, + "TuringHelperFactory": { + "address": "0x58dDFB37998584991d8b75F87baf0A3428dD095e" + }, + "TuringMonsters": { + "address": "0x757b8E819d91659844E44F2141402831B60Fa4EE" + }, + "Teleportation": { + "address": "0xB43EE846Aa266228FeABaD1191D6cB2eD9808894" + } + } +} diff --git a/packages/boba/subgraph/L2/config/goerli.json b/packages/boba/subgraph/L2/config/goerli.json index 7842c32188..addc7c3e72 100644 --- a/packages/boba/subgraph/L2/config/goerli.json +++ b/packages/boba/subgraph/L2/config/goerli.json @@ -1,5 +1,5 @@ { - "network": "boba", + "network": "goerli", "contracts": { "L2LiquidityPool": { "address": "0x8d3866a79aA780BA3DC1a300a1567635F3754a0e" @@ -15,12 +15,12 @@ }, "TuringHelperFactory": { "address": "0x58dDFB37998584991d8b75F87baf0A3428dD095e" - }, + }, "TuringMonsters": { "address": "0x757b8E819d91659844E44F2141402831B60Fa4EE" }, "Teleportation": { - "address": "0xB43EE846Aa266228FeABaD1191D6cB2eD9808894" + "address": "0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13" } } } diff --git a/packages/boba/subgraph/L2/config/optimism-goerli.json b/packages/boba/subgraph/L2/config/optimism-goerli.json new file mode 100644 index 0000000000..4a829e930e --- /dev/null +++ b/packages/boba/subgraph/L2/config/optimism-goerli.json @@ -0,0 +1,26 @@ +{ + "network": "optimism-goerli", + "contracts": { + "L2LiquidityPool": { + "address": "0x0000000000000000000000000000000000000000" + }, + "OVM_L2StandardBridge": { + "address": "0x0000000000000000000000000000000000000000" + }, + "GovernorBravoDelegate": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Boba_GasPriceOracle": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringHelperFactory": { + "address": "0x0000000000000000000000000000000000000000" + }, + "TuringMonsters": { + "address": "0x0000000000000000000000000000000000000000" + }, + "Teleportation": { + "address": "0xC226F132A686A08018431C913d87693396246024" + } + } +} diff --git a/packages/boba/subgraph/L2/package.json b/packages/boba/subgraph/L2/package.json index d3a094a09b..48de2dd4e4 100644 --- a/packages/boba/subgraph/L2/package.json +++ b/packages/boba/subgraph/L2/package.json @@ -11,7 +11,8 @@ "create:subgraph:goerli": "graph create --node https://graph.goerli.boba.network:8020 boba/Bridges", "deploy:subgraph:local": "graph deploy boba/Bridges --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020", "deploy:subgraph:goerli": "graph deploy boba/Bridges --ipfs https://graph.goerli.boba.network:5001 --node https://graph.goerli.boba.network:8020", - "deploy:subgraph:mainnet": "graph deploy --product hosted-service BOBANETWORK/boba-l2-subgraph" + "deploy:subgraph:mainnet": "graph deploy --product hosted-service BOBANETWORK/boba-l2-subgraph", + "deploy:goldsky": "goldsky subgraph deploy light-bridge/v1 --from-abi ./subgraph.json" }, "devDependencies": { "@graphprotocol/graph-cli": "^0.55.0", diff --git a/packages/boba/subgraph/L2/subgraph.json b/packages/boba/subgraph/L2/subgraph.json new file mode 100644 index 0000000000..6cf583687b --- /dev/null +++ b/packages/boba/subgraph/L2/subgraph.json @@ -0,0 +1,48 @@ +{ + "version": "1", + "name": "light-bridge", + "abis": { + "Teleportation": { + "path": "./abis/Teleportation.json" + } + }, + "chains": ["arbitrum-goerli", "chapel", "boba-bnb-testnet", "boba-goerli", "goerli", "optimism-goerli"], + "instances": [ + { + "abi": "Teleportation", + "address": "0x7f6a32bCaA70c65E08F2f221737612F6fC18347A", + "startBlock": 32272487, + "chain": "chapel" + }, + { + "abi": "Teleportation", + "address": "0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13", + "startBlock": 9484025, + "chain": "goerli" + }, + { + "abi": "Teleportation", + "address": "0xC226F132A686A08018431C913d87693396246024", + "startBlock": 17010097, + "chain": "optimism-goerli" + }, + { + "abi": "Teleportation", + "address": "0x7063f59e1Db3e505D844d11A71C78F92D39E5963", + "startBlock": 53880808, + "chain": "arbitrum-goerli" + }, + { + "abi": "Teleportation", + "address": "0xf4d179d3a083Fa3Eede935FaF4C679D32d514186", + "startBlock": 295353, + "chain": "boba-bnb-testnet" + }, + { + "abi": "Teleportation", + "address": "0xB43EE846Aa266228FeABaD1191D6cB2eD9808894", + "startBlock": 40822, + "chain": "boba-goerli" + } + ] +} diff --git a/packages/boba/subgraph/README.md b/packages/boba/subgraph/README.md index 9f13535f35..ce6aff3183 100644 --- a/packages/boba/subgraph/README.md +++ b/packages/boba/subgraph/README.md @@ -1,3 +1,13 @@ +# Goldsky migration +Light bridge has been migrated to Goldsky, more contracts may follow (we may need to evaluate which subgraphs are still needed). + +You need only one config file: `subgraph.json` +This one has to be adapted manually, but the rest is automized. + +Just execute `goldsky subgraph deploy light-bridge/v{VERSION} --from-abi ./subgraph.json` to deploy the subgraphs on all supported networks. + +--- + # Boba Network Subgraphs These subgraphs index the **StandardBridge**, the **LiquidityPool**, the **Boba DAO**, and the **TuringMonster** contracts. diff --git a/packages/boba/teleportation/src/utils/chains.ts b/packages/boba/teleportation/src/utils/chains.ts index bb0f5ffaee..637458749f 100644 --- a/packages/boba/teleportation/src/utils/chains.ts +++ b/packages/boba/teleportation/src/utils/chains.ts @@ -27,7 +27,6 @@ export const BobaChains: IBobaChains = { //#region boba_networks 288: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) --> boba listed though, but requires a hosted service url: process.env.TELEPORTATION_RPC_BOBAETHMAINNET ?? 'https://boba-ethereum.gateway.tenderly.co', testnet: false, name: 'Boba Ethereum Mainnet', @@ -41,7 +40,6 @@ export const BobaChains: IBobaChains = { }, }, 56288: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) url: process.env.TELEPORTATION_RPC_BOBABNBMAINNET ?? 'https://replica.bnb.boba.network', testnet: false, name: 'Boba BNB Mainnet', @@ -53,7 +51,7 @@ export const BobaChains: IBobaChains = { }, }, 2888: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-boba-goerli/v1/gn url: process.env.TELEPORTATION_RPC_BOBAETHGOERLI ?? 'https://replica.goerli.boba.network', testnet: true, name: 'Boba Ethereum Goerli', @@ -65,7 +63,7 @@ export const BobaChains: IBobaChains = { }, }, 9728: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-boba-bnb-testnet/v1/gn url: process.env.TELEPORTATION_RPC_BOBABNBTESTNET ?? 'https://boba-bnb-testnet.gateway.tenderly.co', testnet: true, name: 'Boba BNB Testnet', @@ -78,6 +76,7 @@ export const BobaChains: IBobaChains = { }, }, 421613: { + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-arbitrum-goerli/v1/gn url: process.env.TELEPORTATION_RPC_ARBITRUMGOERLI ?? 'https://arbitrum-goerli.public.blastapi.io', testnet: true, name: 'Arbitrum Goerli', @@ -88,6 +87,7 @@ export const BobaChains: IBobaChains = { }, }, 420: { + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-optimism-goerli/v1/gn url: process.env.TELEPORTATION_RPC_OPTIMISMGOERLI ?? 'https://optimism-goerli.publicnode.com', testnet: true, name: 'Optimism Goerli', @@ -98,7 +98,6 @@ export const BobaChains: IBobaChains = { }, }, 42161: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) url: process.env.TELEPORTATION_RPC_ARBITRUMMAINNET ?? 'https://arbitrum.llamarpc.com', testnet: false, name: 'Arbitrum Mainnet', @@ -109,7 +108,6 @@ export const BobaChains: IBobaChains = { }, }, 10: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) url: process.env.TELEPORTATION_RPC_OPTIMISMMAINNET ?? 'https://optimism.llamarpc.com', testnet: false, name: 'Optimism Mainnet', @@ -122,7 +120,6 @@ export const BobaChains: IBobaChains = { //#endregion //#region l1 1: { - // TODO: Public nodes available, deploy once contract is live url: process.env.TELEPORTATION_RPC_ETHMAINNET ?? 'https://eth.llamarpc.com', testnet: false, name: 'Ethereum Mainnet', @@ -136,7 +133,6 @@ export const BobaChains: IBobaChains = { }, }, 56: { - // TODO: Public nodes available, deploy once contract is live url: process.env.TELEPORTATION_RPC_BNBMAINNET ?? 'https://rpc.ankr.com/bsc', testnet: false, name: 'BNB Mainnet', @@ -150,7 +146,7 @@ export const BobaChains: IBobaChains = { }, }, 5: { - // TODO: DEV VERSION (GRT tokens needed): subgraph deployed: https://api.studio.thegraph.com/query/57436/boba_bridges/version/latest + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-goerli/v1/gn url: process.env.TELEPORTATION_RPC_GOERLITESTNET ?? 'https://rpc.ankr.com/eth_goerli', testnet: true, name: 'Goerli Testnet', @@ -164,7 +160,7 @@ export const BobaChains: IBobaChains = { }, }, 97: { - // TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) + // GoldSky GraphQL endpoint: https://api.goldsky.com/api/public/project_clq6jph4q9t2p01uja7p1f0c3/subgraphs/light-bridge-chapel/v1/gn url: process.env.TELEPORTATION_RPC_BNBTESTNET ?? 'https://api.zan.top/node/v1/bsc/testnet/public', testnet: true, name: 'BNB Testnet',