From ff5ea51c61a8d52561d12d74c2289bda57a969c4 Mon Sep 17 00:00:00 2001 From: Dinesh Pinto Date: Wed, 17 Jul 2024 21:00:20 +0400 Subject: [PATCH 1/4] fix: public RPC on network page --- docs/network/0-overview.mdx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/network/0-overview.mdx b/docs/network/0-overview.mdx index 72ba30f2..32c992fa 100644 --- a/docs/network/0-overview.mdx +++ b/docs/network/0-overview.mdx @@ -39,8 +39,9 @@ Configuration for all Flare networks, along with public and private RPCs, blockc | Gas token | FLR | | Gas token decimals | 18 | | Blockchain Explorers | [Flarescan](https://flarescan.com), [Flare Explorer](https://flare-explorer.flare.network) | - | Public RPCs | [Ankr](https://rpc.ankr.com/flare), [Thirdweb](https://14.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/14) | - | Private RPCs | [Ankr](https://rpc.ankr.com/flare), [API Portal](https://api-portal.flare.network/apis/flare-api) | + | Public RPCs | `https://flare-api.flare.network/ext/C/rpc`

`wss://flare-api.flare.network/ext/bc/C/ws` | + | Private RPCs | [API Portal](https://api-portal.flare.network/apis/flare-api) | + | Community RPCs | [Ankr](https://rpc.ankr.com/flare), [Thirdweb](https://14.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/14) | | Indexers | [SubQuery](https://github.com/subquery/flare-subql-starter/tree/main/Flare/flare-starter), [Subsquid](https://docs.subsquid.io/subsquid-network/reference/evm-networks/) | | OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/flare) | | Account Abstraction | [Etherspot Prime SDK](https://etherspot.fyi/prime-sdk/intro) | @@ -55,8 +56,9 @@ Configuration for all Flare networks, along with public and private RPCs, blockc | Gas token | C2FLR | | Gas token decimals | 18 | | Blockchain Explorers | [Coston2 Flarescan](https://coston2.testnet.flarescan.com), [Coston2 Explorer](https://coston2-explorer.flare.network) | - | Public RPCs | [Ankr](https://rpc.ankr.com/flare_coston2), [Thirdweb](https://114.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/114) | - | Private RPCs | [Ankr](https://rpc.ankr.com/flare_coston2), [API Portal](https://api-portal.flare.network/apis/coston2-api) | + | Public RPCs | `https://coston2-api.flare.network/ext/C/rpc`

`wss://coston2-api.flare.network/ext/bc/C/ws` | + | Private RPCs | [API Portal](https://api-portal.flare.network/apis/coston2-api) | + | Community RPCs | [Ankr](https://rpc.ankr.com/flare_coston2), [Thirdweb](https://114.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/114) | | Indexers | - | | OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/flare) | | Account Abstraction | [Etherspot Prime SDK](https://etherspot.fyi/prime-sdk/intro) | @@ -71,8 +73,9 @@ Configuration for all Flare networks, along with public and private RPCs, blockc | Gas token | SGB | | Gas token decimals | 18 | | Blockchain Explorers | [Songbird Flarescan](https://songbird.flarescan.com), [Songbird Explorer](https://songbird-explorer.flare.network) | - | Public RPCs | [Ankr](https://rpc.ankr.com/flare_songbird), [Thirdweb](https://19.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/19) | - | Private RPCs | [Ankr](https://rpc.ankr.com/flare_songbird), [API Portal](https://api-portal.flare.network/apis/songbird-api) | + | Public RPCs | `https://songbird-api.flare.network/ext/C/rpc`

`wss://songbird-api.flare.network/ext/bc/C/ws` | + | Private RPCs | [API Portal](https://api-portal.flare.network/apis/songbird-api) | + | Community RPCs | [Ankr](https://rpc.ankr.com/flare_songbird), [Thirdweb](https://19.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/19) | | Indexers | [SubQuery](https://github.com/subquery/flare-subql-starter/tree/main/Flare/songbird-starter), [Subsquid](https://docs.subsquid.io/subsquid-network/reference/evm-networks/) | | OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/songbird/) | | Account Abstraction | - | @@ -87,8 +90,9 @@ Configuration for all Flare networks, along with public and private RPCs, blockc | Gas token | CFLR | | Gas token decimals | 18 | | Blockchain Explorers | [Coston Flarescan](https://coston.testnet.flarescan.com), [Coston Explorer](https://coston-explorer.flare.network) | - | Public RPCs | [Ankr](https://rpc.ankr.com/flare_coston), [Thirdweb](https://16.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/16) | - | Private RPCs | [Ankr](https://rpc.ankr.com/flare_coston), [API Portal](https://api-portal.flare.network/apis/coston-api) | + | Public RPCs | `https://coston-api.flare.network/ext/C/rpc`

`wss://coston-api.flare.network/ext/bc/C/ws` | + | Private RPCs | [API Portal](https://api-portal.flare.network/apis/coston-api) | + | Community RPCs | [Ankr](https://rpc.ankr.com/flare_coston), [Thirdweb](https://16.rpc.thirdweb.com), [ChainList](https://ChainList.org/chain/16) | | Indexers | - | | OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/songbird/) | | Account Abstraction | - | From a9cdfd96223c52939b8853ad8a4df71ec5740136 Mon Sep 17 00:00:00 2001 From: Dinesh Pinto Date: Wed, 17 Jul 2024 21:00:31 +0400 Subject: [PATCH 2/4] fix: guides using public rpc --- docs/network/guides/flare-for-go-developers.mdx | 2 +- docs/network/guides/flare-for-javascript-developers.mdx | 2 +- docs/network/guides/flare-for-python-developers.mdx | 2 +- docs/network/guides/flare-for-rust-developers.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/network/guides/flare-for-go-developers.mdx b/docs/network/guides/flare-for-go-developers.mdx index c849b97b..ee6f3bbc 100644 --- a/docs/network/guides/flare-for-go-developers.mdx +++ b/docs/network/guides/flare-for-go-developers.mdx @@ -78,7 +78,7 @@ developer-hub-go/ ### Usage -You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the [Ankr RPC](https://rpc.ankr.com/flare). +You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the Public RPC. diff --git a/docs/network/guides/flare-for-javascript-developers.mdx b/docs/network/guides/flare-for-javascript-developers.mdx index b017217c..0ce22d60 100644 --- a/docs/network/guides/flare-for-javascript-developers.mdx +++ b/docs/network/guides/flare-for-javascript-developers.mdx @@ -88,7 +88,7 @@ Install web3.js using either `npm` or `yarn`: ### Usage -You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the [Ankr RPC](https://rpc.ankr.com/flare). +You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the Public RPC. diff --git a/docs/network/guides/flare-for-python-developers.mdx b/docs/network/guides/flare-for-python-developers.mdx index ff138fe8..d49bc6a6 100644 --- a/docs/network/guides/flare-for-python-developers.mdx +++ b/docs/network/guides/flare-for-python-developers.mdx @@ -57,7 +57,7 @@ All examples in this guide are available on the [developer-hub repository](https ### Usage -You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the [Ankr RPC](https://rpc.ankr.com/flare). +You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the Public RPC. diff --git a/docs/network/guides/flare-for-rust-developers.mdx b/docs/network/guides/flare-for-rust-developers.mdx index dac15c2f..a6ba5290 100644 --- a/docs/network/guides/flare-for-rust-developers.mdx +++ b/docs/network/guides/flare-for-rust-developers.mdx @@ -67,7 +67,7 @@ tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] } ### Usage -You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the [Ankr RPC](https://rpc.ankr.com/flare). +You need to connect to testnet or mainnet via an RPC, any RPC listed on the [Network Configuration](/network/overview#configuration) page will work. For this guide, you can use the Public RPC. From bb51687088a6414888e741af7531071b9ce34d90 Mon Sep 17 00:00:00 2001 From: Dinesh Pinto Date: Wed, 17 Jul 2024 21:00:46 +0400 Subject: [PATCH 3/4] fix: code examples using public RPC --- examples/developer-hub-go/coston2/chain_id.go | 2 +- examples/developer-hub-go/coston2/deploy_contract.go | 2 +- examples/developer-hub-go/coston2/make_query.go | 2 +- examples/developer-hub-go/coston2/secure_random.go | 2 +- examples/developer-hub-go/coston2/volatility_incentive.go | 2 +- examples/developer-hub-go/flare/chain_id.go | 2 +- examples/developer-hub-go/flare/deploy_contract.go | 2 +- examples/developer-hub-go/flare/make_query.go | 2 +- examples/developer-hub-go/ftsov2_config_coston2.go | 2 +- examples/developer-hub-go/ftsov2_consumer_coston2.go | 2 +- examples/developer-hub-javascript/chain_id_coston2.js | 2 +- examples/developer-hub-javascript/chain_id_flare.js | 2 +- examples/developer-hub-javascript/deploy_contract_coston2.js | 2 +- examples/developer-hub-javascript/deploy_contract_flare.js | 2 +- .../developer-hub-javascript/ftsov2_config_coston2_ethers.js | 2 +- examples/developer-hub-javascript/ftsov2_config_coston2_web3.js | 2 +- .../developer-hub-javascript/ftsov2_consumer_coston2_ethers.js | 2 +- .../developer-hub-javascript/ftsov2_consumer_coston2_web3.js | 2 +- examples/developer-hub-javascript/make_query_coston2.js | 2 +- examples/developer-hub-javascript/make_query_flare.js | 2 +- .../developer-hub-javascript/secure_random_coston2_ethers.js | 2 +- examples/developer-hub-javascript/secure_random_coston2_web3.js | 2 +- .../volatility_incentive_coston2_ethers.js | 2 +- .../volatility_incentive_coston2_web3.js | 2 +- examples/developer-hub-python/chain_id_coston2.py | 2 +- examples/developer-hub-python/chain_id_flare.py | 2 +- examples/developer-hub-python/deploy_contract_coston2.py | 2 +- examples/developer-hub-python/deploy_contract_flare.py | 2 +- examples/developer-hub-python/ftsov2_config_coston2.py | 2 +- examples/developer-hub-python/ftsov2_consumer_coston2.py | 2 +- examples/developer-hub-python/make_query_coston2.py | 2 +- examples/developer-hub-python/make_query_flare.py | 2 +- examples/developer-hub-python/secure_random_coston2.py | 2 +- examples/developer-hub-python/volatility_incentive_coston2.py | 2 +- examples/developer-hub-rust/src/bin/chain_id_coston2.rs | 2 +- examples/developer-hub-rust/src/bin/chain_id_flare.rs | 2 +- examples/developer-hub-rust/src/bin/deploy_contract_coston2.rs | 2 +- examples/developer-hub-rust/src/bin/deploy_contract_flare.rs | 2 +- examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs | 2 +- examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs | 2 +- examples/developer-hub-rust/src/bin/make_query_coston2.rs | 2 +- examples/developer-hub-rust/src/bin/make_query_flare.rs | 2 +- examples/developer-hub-rust/src/bin/secure_random_coston2.rs | 2 +- .../developer-hub-rust/src/bin/volatility_incentive_coston2.rs | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/developer-hub-go/coston2/chain_id.go b/examples/developer-hub-go/coston2/chain_id.go index e04b9ed4..9cabceaf 100644 --- a/examples/developer-hub-go/coston2/chain_id.go +++ b/examples/developer-hub-go/coston2/chain_id.go @@ -8,7 +8,7 @@ import ( ) func ChainId() { - cl, err := ethclient.Dial("https://rpc.ankr.com/flare_coston2") + cl, err := ethclient.Dial("https://coston2-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/coston2/deploy_contract.go b/examples/developer-hub-go/coston2/deploy_contract.go index 8ed78f0b..e84abfad 100644 --- a/examples/developer-hub-go/coston2/deploy_contract.go +++ b/examples/developer-hub-go/coston2/deploy_contract.go @@ -17,7 +17,7 @@ import ( const key = `` func DeployContract() { - conn, err := ethclient.Dial("https://rpc.ankr.com/flare_coston2") + conn, err := ethclient.Dial("https://coston2-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/coston2/make_query.go b/examples/developer-hub-go/coston2/make_query.go index 179d92cb..c5847311 100644 --- a/examples/developer-hub-go/coston2/make_query.go +++ b/examples/developer-hub-go/coston2/make_query.go @@ -10,7 +10,7 @@ import ( ) func MakeQuery() { - client, err := ethclient.Dial("https://rpc.ankr.com/flare_coston2") + client, err := ethclient.Dial("https://coston2-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/coston2/secure_random.go b/examples/developer-hub-go/coston2/secure_random.go index d4ff3b6b..d0aaea08 100644 --- a/examples/developer-hub-go/coston2/secure_random.go +++ b/examples/developer-hub-go/coston2/secure_random.go @@ -14,7 +14,7 @@ func SecureRandom() { // Relay address where the secure RNG is served (Flare Testnet Coston2) // See https://dev.flare.network/network/solidity-reference address := common.HexToAddress("0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250") - rpcUrl := "https://rpc.ankr.com/flare_coston2" + rpcUrl := "https://coston2-api.flare.network/ext/C/rpc" // Connect to an RPC node client, _ := ethclient.Dial(rpcUrl) // Set up contract instance diff --git a/examples/developer-hub-go/coston2/volatility_incentive.go b/examples/developer-hub-go/coston2/volatility_incentive.go index 6aab1c3e..95b4222f 100644 --- a/examples/developer-hub-go/coston2/volatility_incentive.go +++ b/examples/developer-hub-go/coston2/volatility_incentive.go @@ -21,7 +21,7 @@ func MakeVolatilityIncentive() { // See https://dev.flare.network/ftso/solidity-reference incentiveAddress := common.HexToAddress("0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c") // Connect to an RPC node - client, _ := ethclient.Dial("https://rpc.ankr.com/flare_coston2") + client, _ := ethclient.Dial("https://coston2-api.flare.network/ext/C/rpc") // Set up contract instance incentive, _ := NewFastUpdatesIncentiveManager(incentiveAddress, client) // Get the current sample size, sample size increase price, precision, and scale diff --git a/examples/developer-hub-go/flare/chain_id.go b/examples/developer-hub-go/flare/chain_id.go index 35810bf2..8ebee3c3 100644 --- a/examples/developer-hub-go/flare/chain_id.go +++ b/examples/developer-hub-go/flare/chain_id.go @@ -8,7 +8,7 @@ import ( ) func ChainId() { - cl, err := ethclient.Dial("https://rpc.ankr.com/flare") + cl, err := ethclient.Dial("https://flare-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/flare/deploy_contract.go b/examples/developer-hub-go/flare/deploy_contract.go index e219c749..ca5660c2 100644 --- a/examples/developer-hub-go/flare/deploy_contract.go +++ b/examples/developer-hub-go/flare/deploy_contract.go @@ -17,7 +17,7 @@ import ( const key = `` func DeployContract() { - conn, err := ethclient.Dial("https://rpc.ankr.com/flare") + conn, err := ethclient.Dial("https://flare-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/flare/make_query.go b/examples/developer-hub-go/flare/make_query.go index b031681e..6fbf5f59 100644 --- a/examples/developer-hub-go/flare/make_query.go +++ b/examples/developer-hub-go/flare/make_query.go @@ -10,7 +10,7 @@ import ( ) func MakeQuery() { - client, err := ethclient.Dial("https://rpc.ankr.com/flare") + client, err := ethclient.Dial("https://flare-api.flare.network/ext/C/rpc") if err != nil { panic(err) } diff --git a/examples/developer-hub-go/ftsov2_config_coston2.go b/examples/developer-hub-go/ftsov2_config_coston2.go index 5da65b75..82bbf0d4 100644 --- a/examples/developer-hub-go/ftsov2_config_coston2.go +++ b/examples/developer-hub-go/ftsov2_config_coston2.go @@ -14,7 +14,7 @@ func FtsoV2Config() { // FastUpdatesConfiguration address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference address := common.HexToAddress("0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14") - rpcUrl := "https://rpc.ankr.com/flare_coston2" + rpcUrl := "https://coston2-api.flare.network/ext/C/rpc" // Connect to an RPC node client, _ := ethclient.Dial(rpcUrl) // Set up contract instance diff --git a/examples/developer-hub-go/ftsov2_consumer_coston2.go b/examples/developer-hub-go/ftsov2_consumer_coston2.go index 97eb1456..2e0ee089 100644 --- a/examples/developer-hub-go/ftsov2_consumer_coston2.go +++ b/examples/developer-hub-go/ftsov2_consumer_coston2.go @@ -16,7 +16,7 @@ func FtsoV2Consumer() { // FastUpdater address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference ftsoAddress := common.HexToAddress("0x58fb598EC6DB6901aA6F26a9A2087E9274128E59") - rpcUrl := "https://rpc.ankr.com/flare_coston2" + rpcUrl := "https://coston2-api.flare.network/ext/C/rpc" // Connect to an RPC node client, _ := ethclient.Dial(rpcUrl) // Set up contract instance diff --git a/examples/developer-hub-javascript/chain_id_coston2.js b/examples/developer-hub-javascript/chain_id_coston2.js index baf9e7bc..83714006 100644 --- a/examples/developer-hub-javascript/chain_id_coston2.js +++ b/examples/developer-hub-javascript/chain_id_coston2.js @@ -1,5 +1,5 @@ import { Web3 } from "web3"; -const web3 = new Web3("https://rpc.ankr.com/flare_coston2"); +const web3 = new Web3("https://coston2-api.flare.network/ext/C/rpc"); web3.eth.getChainId().then(console.log); // 114 diff --git a/examples/developer-hub-javascript/chain_id_flare.js b/examples/developer-hub-javascript/chain_id_flare.js index 8b706f82..7bc090d7 100644 --- a/examples/developer-hub-javascript/chain_id_flare.js +++ b/examples/developer-hub-javascript/chain_id_flare.js @@ -1,5 +1,5 @@ import { Web3 } from "web3"; -const web3 = new Web3("https://rpc.ankr.com/flare"); +const web3 = new Web3("https://flare-api.flare.network/ext/C/rpc"); web3.eth.getChainId().then(console.log); // 14 diff --git a/examples/developer-hub-javascript/deploy_contract_coston2.js b/examples/developer-hub-javascript/deploy_contract_coston2.js index f7a6a4a3..c74ba6c7 100644 --- a/examples/developer-hub-javascript/deploy_contract_coston2.js +++ b/examples/developer-hub-javascript/deploy_contract_coston2.js @@ -3,7 +3,7 @@ import { Web3 } from "web3"; import fs from "fs"; const web3 = new Web3( - new Web3.providers.HttpProvider("https://rpc.ankr.com/flare_coston2"), + new Web3.providers.HttpProvider("https://coston2-api.flare.network/ext/C/rpc"), ); const bytecode = fs.readFileSync("./build/FtsoV2FeedConsumer.bin", "utf8"); diff --git a/examples/developer-hub-javascript/deploy_contract_flare.js b/examples/developer-hub-javascript/deploy_contract_flare.js index 4aaed289..50a19137 100644 --- a/examples/developer-hub-javascript/deploy_contract_flare.js +++ b/examples/developer-hub-javascript/deploy_contract_flare.js @@ -3,7 +3,7 @@ import { Web3 } from "web3"; import fs from "fs"; const web3 = new Web3( - new Web3.providers.HttpProvider("https://rpc.ankr.com/flare"), + new Web3.providers.HttpProvider("https://flare-api.flare.network/ext/C/rpc"), ); const bytecode = fs.readFileSync("./build/FtsoV2FeedConsumer.bin", "utf8"); diff --git a/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js b/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js index 203b5ac6..4641bf95 100644 --- a/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js +++ b/examples/developer-hub-javascript/ftsov2_config_coston2_ethers.js @@ -4,7 +4,7 @@ import { ethers } from "ethers"; // FastUpdatesConfiguration address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for FastUpdatesConfiguration contract const ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"}]},{"type":"event","name":"FeedAdded","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedRemoved","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedUpdated","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFastUpdater"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}],"name":"getFeedConfigurations","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}],"name":"getFeedId","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}],"name":"getFeedIds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_index","internalType":"uint256"}],"name":"getFeedIndex","inputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberOfFeeds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getUnusedIndices","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeFeeds","inputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]}]'; diff --git a/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js b/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js index b314ecc5..bba6d5a4 100644 --- a/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js +++ b/examples/developer-hub-javascript/ftsov2_config_coston2_web3.js @@ -4,7 +4,7 @@ import { Web3 } from "web3"; // FastUpdatesConfiguration address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for FastUpdatesConfiguration contract const ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"}]},{"type":"event","name":"FeedAdded","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedRemoved","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedUpdated","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFastUpdater"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}],"name":"getFeedConfigurations","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}],"name":"getFeedId","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}],"name":"getFeedIds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_index","internalType":"uint256"}],"name":"getFeedIndex","inputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberOfFeeds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getUnusedIndices","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeFeeds","inputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]}]'; diff --git a/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js b/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js index 96fe7bad..33b73a64 100644 --- a/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js +++ b/examples/developer-hub-javascript/ftsov2_consumer_coston2_ethers.js @@ -4,7 +4,7 @@ import { ethers } from "ethers"; // FastUpdater address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD const FEED_INDEXES = [0, 2, 9]; // ABI for FastUpdater contract diff --git a/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js b/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js index 7b7733cb..19242f0b 100644 --- a/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js +++ b/examples/developer-hub-javascript/ftsov2_consumer_coston2_web3.js @@ -4,7 +4,7 @@ import { Web3 } from "web3"; // FastUpdater address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD const FEED_INDEXES = [0, 2, 9]; // ABI for FastUpdater contract diff --git a/examples/developer-hub-javascript/make_query_coston2.js b/examples/developer-hub-javascript/make_query_coston2.js index 88377bae..ca04b9ac 100644 --- a/examples/developer-hub-javascript/make_query_coston2.js +++ b/examples/developer-hub-javascript/make_query_coston2.js @@ -9,7 +9,7 @@ const response = await fetch(base_url + params); const abi = JSON.parse((await response.json())["result"]); // Query contract -const w3 = new Web3("https://rpc.ankr.com/flare_coston2"); +const w3 = new Web3("https://coston2-api.flare.network/ext/C/rpc"); const registry = new w3.eth.Contract(abi, registry_addr); const res = await registry.methods.getContractAddressByName("WNat").call(); diff --git a/examples/developer-hub-javascript/make_query_flare.js b/examples/developer-hub-javascript/make_query_flare.js index 69f5e835..4ffda2f1 100644 --- a/examples/developer-hub-javascript/make_query_flare.js +++ b/examples/developer-hub-javascript/make_query_flare.js @@ -9,7 +9,7 @@ const response = await fetch(base_url + params); const abi = JSON.parse((await response.json())["result"]); // Query contract -const w3 = new Web3("https://rpc.ankr.com/flare"); +const w3 = new Web3("https://flare-api.flare.network/ext/C/rpc"); const registry = new w3.eth.Contract(abi, registry_addr); const res = await registry.methods.getContractAddressByName("WNat").call(); diff --git a/examples/developer-hub-javascript/secure_random_coston2_ethers.js b/examples/developer-hub-javascript/secure_random_coston2_ethers.js index c7772fde..4db2460d 100644 --- a/examples/developer-hub-javascript/secure_random_coston2_ethers.js +++ b/examples/developer-hub-javascript/secure_random_coston2_ethers.js @@ -4,7 +4,7 @@ import { ethers } from "ethers"; // Relay address where the secure RNG is served(Flare Testnet Coston2) // See https://dev.flare.network/network/solidity-reference const ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for Relay contract const ABI = '[{"inputs":[{"internalType":"address","name":"_signingPolicySetter","type":"address"},{"internalType":"uint32","name":"_initialRewardEpochId","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForInitialRewardEpochId","type":"uint32"},{"internalType":"bytes32","name":"_initialSigningPolicyHash","type":"bytes32"},{"internalType":"uint8","name":"_randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"_firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"_votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"_firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"_rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"_thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"_messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"protocolId","type":"uint8"},{"indexed":true,"internalType":"uint32","name":"votingRoundId","type":"uint32"},{"indexed":false,"internalType":"bool","name":"isSecureRandom","type":"bool"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"ProtocolMessageRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"indexed":false,"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"indexed":false,"internalType":"uint16","name":"threshold","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"voters","type":"address[]"},{"indexed":false,"internalType":"uint16[]","name":"weights","type":"uint16[]"},{"indexed":false,"internalType":"bytes","name":"signingPolicyBytes","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"SigningPolicyInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"SigningPolicyRelayed","type":"event"},{"inputs":[{"internalType":"uint256","name":"_protocolId","type":"uint256"},{"internalType":"uint256","name":"_votingRoundId","type":"uint256"}],"name":"getConfirmedMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"_randomNumber","type":"uint256"},{"internalType":"bool","name":"_isSecureRandom","type":"bool"},{"internalType":"uint256","name":"_randomTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getVotingRoundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastInitializedRewardEpochData","outputs":[{"internalType":"uint32","name":"_lastInitializedRewardEpoch","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForLastInitializedRewardEpoch","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"protocolId","type":"uint256"},{"internalType":"uint256","name":"votingRoundId","type":"uint256"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"relay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"threshold","type":"uint16"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"address[]","name":"voters","type":"address[]"},{"internalType":"uint16[]","name":"weights","type":"uint16[]"}],"internalType":"struct IIRelay.SigningPolicy","name":"_signingPolicy","type":"tuple"}],"name":"setSigningPolicy","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signingPolicySetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"startingVotingRoundIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateData","outputs":[{"internalType":"uint8","name":"randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"randomVotingRoundId","type":"uint32"},{"internalType":"bool","name":"isSecureRandom","type":"bool"},{"internalType":"uint32","name":"lastInitializedRewardEpoch","type":"uint32"},{"internalType":"bool","name":"noSigningPolicyRelay","type":"bool"},{"internalType":"uint32","name":"messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"toSigningPolicyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]'; diff --git a/examples/developer-hub-javascript/secure_random_coston2_web3.js b/examples/developer-hub-javascript/secure_random_coston2_web3.js index f4fee530..011d853f 100644 --- a/examples/developer-hub-javascript/secure_random_coston2_web3.js +++ b/examples/developer-hub-javascript/secure_random_coston2_web3.js @@ -4,7 +4,7 @@ import { Web3 } from "web3"; // Relay address where the secure RNG is served (Flare Testnet Coston2) // See https://dev.flare.network/network/solidity-reference const ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for Relay contract const ABI = '[{"inputs":[{"internalType":"address","name":"_signingPolicySetter","type":"address"},{"internalType":"uint32","name":"_initialRewardEpochId","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForInitialRewardEpochId","type":"uint32"},{"internalType":"bytes32","name":"_initialSigningPolicyHash","type":"bytes32"},{"internalType":"uint8","name":"_randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"_firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"_votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"_firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"_rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"_thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"_messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"protocolId","type":"uint8"},{"indexed":true,"internalType":"uint32","name":"votingRoundId","type":"uint32"},{"indexed":false,"internalType":"bool","name":"isSecureRandom","type":"bool"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"ProtocolMessageRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"indexed":false,"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"indexed":false,"internalType":"uint16","name":"threshold","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"voters","type":"address[]"},{"indexed":false,"internalType":"uint16[]","name":"weights","type":"uint16[]"},{"indexed":false,"internalType":"bytes","name":"signingPolicyBytes","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"SigningPolicyInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"SigningPolicyRelayed","type":"event"},{"inputs":[{"internalType":"uint256","name":"_protocolId","type":"uint256"},{"internalType":"uint256","name":"_votingRoundId","type":"uint256"}],"name":"getConfirmedMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"_randomNumber","type":"uint256"},{"internalType":"bool","name":"_isSecureRandom","type":"bool"},{"internalType":"uint256","name":"_randomTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getVotingRoundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastInitializedRewardEpochData","outputs":[{"internalType":"uint32","name":"_lastInitializedRewardEpoch","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForLastInitializedRewardEpoch","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"protocolId","type":"uint256"},{"internalType":"uint256","name":"votingRoundId","type":"uint256"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"relay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"threshold","type":"uint16"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"address[]","name":"voters","type":"address[]"},{"internalType":"uint16[]","name":"weights","type":"uint16[]"}],"internalType":"struct IIRelay.SigningPolicy","name":"_signingPolicy","type":"tuple"}],"name":"setSigningPolicy","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signingPolicySetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"startingVotingRoundIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateData","outputs":[{"internalType":"uint8","name":"randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"randomVotingRoundId","type":"uint32"},{"internalType":"bool","name":"isSecureRandom","type":"bool"},{"internalType":"uint32","name":"lastInitializedRewardEpoch","type":"uint32"},{"internalType":"bool","name":"noSigningPolicyRelay","type":"bool"},{"internalType":"uint32","name":"messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"toSigningPolicyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]'; diff --git a/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js b/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js index eeeac464..cbb0ee9b 100644 --- a/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js +++ b/examples/developer-hub-javascript/volatility_incentive_coston2_ethers.js @@ -4,7 +4,7 @@ import { ethers } from "ethers"; // FastUpdatesIncentiveManager address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const INCENTIVE_ADDRESS = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for FastUpdatesIncentiveManager contract const ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"},{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_sil","internalType":"SampleSize"},{"type":"uint256","name":"_ril","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_rip","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"event","name":"DailyAuthorizedInflationSet","inputs":[{"type":"uint256","name":"authorizedAmountWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"IncentiveOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"uint256","name":"rangeIncrease","internalType":"Range","indexed":false},{"type":"uint256","name":"sampleSizeIncrease","internalType":"SampleSize","indexed":false},{"type":"uint256","name":"offerAmount","internalType":"Fee","indexed":false}],"anonymous":false},{"type":"event","name":"InflationReceived","inputs":[{"type":"uint256","name":"amountReceivedWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"InflationRewardsOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"tuple[]","name":"feedConfigurations","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","indexed":false,"components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"advance","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dailyAuthorizedInflation","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IFastUpdatesConfiguration"}],"name":"fastUpdatesConfiguration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFlareSystemsManager"}],"name":"flareSystemsManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getBaseScale","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getContractName","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"getCurrentSampleSizeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getExpectedBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"getExpectedSampleSize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getIncentiveDuration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getInflationAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Precision"}],"name":"getPrecision","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"getRange","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getScale","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_lockedFundsWei","internalType":"uint256"},{"type":"uint256","name":"_totalInflationAuthorizedWei","internalType":"uint256"},{"type":"uint256","name":"_totalClaimedWei","internalType":"uint256"}],"name":"getTokenPoolSupplyData","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationAuthorizationReceivedTs","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationReceivedTs","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"offerIncentive","inputs":[{"type":"tuple","name":"_offer","internalType":"struct IFastUpdateIncentiveManager.IncentiveOffer","components":[{"type":"uint256","name":"rangeIncrease","internalType":"Range"},{"type":"uint256","name":"rangeLimit","internalType":"Range"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"rangeIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"rangeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"receiveInflation","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIRewardManager"}],"name":"rewardManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"sampleIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDailyAuthorizedInflation","inputs":[{"type":"uint256","name":"_toAuthorizeWei","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIncentiveParameters","inputs":[{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"Range"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreasePrice","inputs":[{"type":"uint256","name":"_price","internalType":"Fee"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSampleIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"SampleSize"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationAuthorizedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationReceivedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationRewardsOfferedWei","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"triggerRewardEpochSwitchover","inputs":[{"type":"uint24","name":"_currentRewardEpochId","internalType":"uint24"},{"type":"uint64","name":"_currentRewardEpochExpectedEndTs","internalType":"uint64"},{"type":"uint64","name":"_rewardEpochDurationSeconds","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]}]'; diff --git a/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js b/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js index 7671bb67..3a5d753f 100644 --- a/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js +++ b/examples/developer-hub-javascript/volatility_incentive_coston2_web3.js @@ -4,7 +4,7 @@ import { Web3 } from "web3"; // FastUpdatesIncentiveManager address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference const INCENTIVE_ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59"; -const RPC_URL = "https://rpc.ankr.com/flare_coston2"; +const RPC_URL = "https://coston2-api.flare.network/ext/C/rpc"; // ABI for FastUpdatesIncentiveManager contract const ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"},{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_sil","internalType":"SampleSize"},{"type":"uint256","name":"_ril","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_rip","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"event","name":"DailyAuthorizedInflationSet","inputs":[{"type":"uint256","name":"authorizedAmountWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"IncentiveOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"uint256","name":"rangeIncrease","internalType":"Range","indexed":false},{"type":"uint256","name":"sampleSizeIncrease","internalType":"SampleSize","indexed":false},{"type":"uint256","name":"offerAmount","internalType":"Fee","indexed":false}],"anonymous":false},{"type":"event","name":"InflationReceived","inputs":[{"type":"uint256","name":"amountReceivedWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"InflationRewardsOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"tuple[]","name":"feedConfigurations","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","indexed":false,"components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"advance","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dailyAuthorizedInflation","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IFastUpdatesConfiguration"}],"name":"fastUpdatesConfiguration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFlareSystemsManager"}],"name":"flareSystemsManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getBaseScale","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getContractName","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"getCurrentSampleSizeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getExpectedBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"getExpectedSampleSize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getIncentiveDuration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getInflationAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Precision"}],"name":"getPrecision","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"getRange","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getScale","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_lockedFundsWei","internalType":"uint256"},{"type":"uint256","name":"_totalInflationAuthorizedWei","internalType":"uint256"},{"type":"uint256","name":"_totalClaimedWei","internalType":"uint256"}],"name":"getTokenPoolSupplyData","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationAuthorizationReceivedTs","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationReceivedTs","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"offerIncentive","inputs":[{"type":"tuple","name":"_offer","internalType":"struct IFastUpdateIncentiveManager.IncentiveOffer","components":[{"type":"uint256","name":"rangeIncrease","internalType":"Range"},{"type":"uint256","name":"rangeLimit","internalType":"Range"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"rangeIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"rangeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"receiveInflation","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIRewardManager"}],"name":"rewardManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"sampleIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDailyAuthorizedInflation","inputs":[{"type":"uint256","name":"_toAuthorizeWei","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIncentiveParameters","inputs":[{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"Range"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreasePrice","inputs":[{"type":"uint256","name":"_price","internalType":"Fee"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSampleIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"SampleSize"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationAuthorizedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationReceivedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationRewardsOfferedWei","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"triggerRewardEpochSwitchover","inputs":[{"type":"uint24","name":"_currentRewardEpochId","internalType":"uint24"},{"type":"uint64","name":"_currentRewardEpochExpectedEndTs","internalType":"uint64"},{"type":"uint64","name":"_rewardEpochDurationSeconds","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]}]'; diff --git a/examples/developer-hub-python/chain_id_coston2.py b/examples/developer-hub-python/chain_id_coston2.py index ad9b6801..a898113c 100644 --- a/examples/developer-hub-python/chain_id_coston2.py +++ b/examples/developer-hub-python/chain_id_coston2.py @@ -7,7 +7,7 @@ async def main() -> int: # Inject middleware to handle testnet PoA consensus w3 = AsyncWeb3( - AsyncHTTPProvider("https://rpc.ankr.com/flare_coston2"), + AsyncHTTPProvider("https://coston2-api.flare.network/ext/C/rpc"), middlewares=[async_geth_poa_middleware], ) chain_id = await w3.eth.chain_id diff --git a/examples/developer-hub-python/chain_id_flare.py b/examples/developer-hub-python/chain_id_flare.py index 7db6cc4e..1ddef1fa 100644 --- a/examples/developer-hub-python/chain_id_flare.py +++ b/examples/developer-hub-python/chain_id_flare.py @@ -5,7 +5,7 @@ async def main() -> int: w3 = AsyncWeb3( - AsyncHTTPProvider("https://rpc.ankr.com/flare"), + AsyncHTTPProvider("https://flare-api.flare.network/ext/C/rpc"), ) chain_id = await w3.eth.chain_id print(f"Chain ID: {chain_id}") diff --git a/examples/developer-hub-python/deploy_contract_coston2.py b/examples/developer-hub-python/deploy_contract_coston2.py index abbad68d..e0147cb1 100644 --- a/examples/developer-hub-python/deploy_contract_coston2.py +++ b/examples/developer-hub-python/deploy_contract_coston2.py @@ -13,7 +13,7 @@ async def main() -> None: contract_interface = load_contract_interface("FtsoV2FeedConsumer") w3 = AsyncWeb3( - AsyncHTTPProvider("https://rpc.ankr.com/flare_coston2"), + AsyncHTTPProvider("https://coston2-api.flare.network/ext/C/rpc"), middlewares=[async_geth_poa_middleware], ) account = w3.to_checksum_address(account) diff --git a/examples/developer-hub-python/deploy_contract_flare.py b/examples/developer-hub-python/deploy_contract_flare.py index 9fa729fe..375ddcf8 100644 --- a/examples/developer-hub-python/deploy_contract_flare.py +++ b/examples/developer-hub-python/deploy_contract_flare.py @@ -11,7 +11,7 @@ async def main() -> None: account, private_key = os.getenv("ACCOUNT"), os.getenv("ACCOUNT_PRIVATE_KEY") contract_interface = load_contract_interface("FtsoV2FeedConsumer") - w3 = AsyncWeb3(AsyncHTTPProvider("https://rpc.ankr.com/flare")) + w3 = AsyncWeb3(AsyncHTTPProvider("https://flare-api.flare.network/ext/C/rpc")) ftsoV2_feed_consumer = w3.eth.contract( abi=contract_interface["abi"], bytecode=contract_interface["evm"]["bytecode"]["object"], diff --git a/examples/developer-hub-python/ftsov2_config_coston2.py b/examples/developer-hub-python/ftsov2_config_coston2.py index 659729a8..26fb1338 100644 --- a/examples/developer-hub-python/ftsov2_config_coston2.py +++ b/examples/developer-hub-python/ftsov2_config_coston2.py @@ -6,7 +6,7 @@ # FastUpdatesConfiguration address (Flare Testnet Coston2) # See https://dev.flare.network/ftso/solidity-reference ADDRESS = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14" -RPC_URL = "https://rpc.ankr.com/flare_coston2" +RPC_URL = "https://coston2-api.flare.network/ext/C/rpc" # ABI for FastUpdatesConfiguration contract ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"}]},{"type":"event","name":"FeedAdded","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedRemoved","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeedUpdated","inputs":[{"type":"bytes21","name":"feedId","internalType":"bytes21","indexed":true},{"type":"uint32","name":"rewardBandValue","internalType":"uint32","indexed":false},{"type":"uint24","name":"inflationShare","internalType":"uint24","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFastUpdater"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}],"name":"getFeedConfigurations","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}],"name":"getFeedId","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}],"name":"getFeedIds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_index","internalType":"uint256"}],"name":"getFeedIndex","inputs":[{"type":"bytes21","name":"_feedId","internalType":"bytes21"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberOfFeeds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getUnusedIndices","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeFeeds","inputs":[{"type":"bytes21[]","name":"_feedIds","internalType":"bytes21[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateFeeds","inputs":[{"type":"tuple[]","name":"_feedConfigs","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]}]}]' diff --git a/examples/developer-hub-python/ftsov2_consumer_coston2.py b/examples/developer-hub-python/ftsov2_consumer_coston2.py index 63cc2b72..a4a4e86d 100644 --- a/examples/developer-hub-python/ftsov2_consumer_coston2.py +++ b/examples/developer-hub-python/ftsov2_consumer_coston2.py @@ -6,7 +6,7 @@ # FastUpdater address (Flare Testnet Coston2) # See https://dev.flare.network/ftso/solidity-reference FTSO_ADDRESS = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59" -RPC_URL = "https://rpc.ankr.com/flare_coston2" +RPC_URL = "https://coston2-api.flare.network/ext/C/rpc" # Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD FEED_INDEXES = [0, 2, 9] # ABI for FastUpdater contract diff --git a/examples/developer-hub-python/make_query_coston2.py b/examples/developer-hub-python/make_query_coston2.py index f0777c27..752e7bae 100644 --- a/examples/developer-hub-python/make_query_coston2.py +++ b/examples/developer-hub-python/make_query_coston2.py @@ -9,7 +9,7 @@ async def main() -> str: registry_addr = "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" w3 = AsyncWeb3( - AsyncHTTPProvider("https://rpc.ankr.com/flare_coston2"), + AsyncHTTPProvider("https://coston2-api.flare.network/ext/C/rpc"), middlewares=[async_geth_poa_middleware], ) params = { diff --git a/examples/developer-hub-python/make_query_flare.py b/examples/developer-hub-python/make_query_flare.py index 64cac5f9..6e95c35e 100644 --- a/examples/developer-hub-python/make_query_flare.py +++ b/examples/developer-hub-python/make_query_flare.py @@ -9,7 +9,7 @@ async def main() -> str: registry_addr = "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019" w3 = AsyncWeb3( - AsyncHTTPProvider("https://rpc.ankr.com/flare"), + AsyncHTTPProvider("https://flare-api.flare.network/ext/C/rpc"), middlewares=[async_geth_poa_middleware], ) params = { diff --git a/examples/developer-hub-python/secure_random_coston2.py b/examples/developer-hub-python/secure_random_coston2.py index 8fa5613c..d3ded740 100644 --- a/examples/developer-hub-python/secure_random_coston2.py +++ b/examples/developer-hub-python/secure_random_coston2.py @@ -6,7 +6,7 @@ # Relay address where the secure RNG is served (Flare Testnet Coston2) # See https://dev.flare.network/network/solidity-reference ADDRESS = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250" -RPC_URL = "https://rpc.ankr.com/flare_coston2" +RPC_URL = "https://coston2-api.flare.network/ext/C/rpc" # ABI for Relay contract ABI = '[{"inputs":[{"internalType":"address","name":"_signingPolicySetter","type":"address"},{"internalType":"uint32","name":"_initialRewardEpochId","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForInitialRewardEpochId","type":"uint32"},{"internalType":"bytes32","name":"_initialSigningPolicyHash","type":"bytes32"},{"internalType":"uint8","name":"_randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"_firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"_votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"_firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"_rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"_thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"_messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"protocolId","type":"uint8"},{"indexed":true,"internalType":"uint32","name":"votingRoundId","type":"uint32"},{"indexed":false,"internalType":"bool","name":"isSecureRandom","type":"bool"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"ProtocolMessageRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"indexed":false,"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"indexed":false,"internalType":"uint16","name":"threshold","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"voters","type":"address[]"},{"indexed":false,"internalType":"uint16[]","name":"weights","type":"uint16[]"},{"indexed":false,"internalType":"bytes","name":"signingPolicyBytes","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"SigningPolicyInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"SigningPolicyRelayed","type":"event"},{"inputs":[{"internalType":"uint256","name":"_protocolId","type":"uint256"},{"internalType":"uint256","name":"_votingRoundId","type":"uint256"}],"name":"getConfirmedMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"_randomNumber","type":"uint256"},{"internalType":"bool","name":"_isSecureRandom","type":"bool"},{"internalType":"uint256","name":"_randomTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getVotingRoundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastInitializedRewardEpochData","outputs":[{"internalType":"uint32","name":"_lastInitializedRewardEpoch","type":"uint32"},{"internalType":"uint32","name":"_startingVotingRoundIdForLastInitializedRewardEpoch","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"protocolId","type":"uint256"},{"internalType":"uint256","name":"votingRoundId","type":"uint256"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"relay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint24","name":"rewardEpochId","type":"uint24"},{"internalType":"uint32","name":"startVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"threshold","type":"uint16"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"address[]","name":"voters","type":"address[]"},{"internalType":"uint16[]","name":"weights","type":"uint16[]"}],"internalType":"struct IIRelay.SigningPolicy","name":"_signingPolicy","type":"tuple"}],"name":"setSigningPolicy","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signingPolicySetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"startingVotingRoundIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateData","outputs":[{"internalType":"uint8","name":"randomNumberProtocolId","type":"uint8"},{"internalType":"uint32","name":"firstVotingRoundStartTs","type":"uint32"},{"internalType":"uint8","name":"votingEpochDurationSeconds","type":"uint8"},{"internalType":"uint32","name":"firstRewardEpochStartVotingRoundId","type":"uint32"},{"internalType":"uint16","name":"rewardEpochDurationInVotingEpochs","type":"uint16"},{"internalType":"uint16","name":"thresholdIncreaseBIPS","type":"uint16"},{"internalType":"uint32","name":"randomVotingRoundId","type":"uint32"},{"internalType":"bool","name":"isSecureRandom","type":"bool"},{"internalType":"uint32","name":"lastInitializedRewardEpoch","type":"uint32"},{"internalType":"bool","name":"noSigningPolicyRelay","type":"bool"},{"internalType":"uint32","name":"messageFinalizationWindowInRewardEpochs","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardEpochId","type":"uint256"}],"name":"toSigningPolicyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]' diff --git a/examples/developer-hub-python/volatility_incentive_coston2.py b/examples/developer-hub-python/volatility_incentive_coston2.py index 6ba0ce9f..bf85dbb1 100644 --- a/examples/developer-hub-python/volatility_incentive_coston2.py +++ b/examples/developer-hub-python/volatility_incentive_coston2.py @@ -7,7 +7,7 @@ # FastUpdatesIncentiveManager address (Flare Testnet Coston2) # See https://dev.flare.network/ftso/solidity-reference INCENTIVE_ADDRESS = "0x003e9bD18f73e0B25BED0DC8382Bde6aa999525c" -RPC_URL = "https://rpc.ankr.com/flare_coston2" +RPC_URL = "https://coston2-api.flare.network/ext/C/rpc" # ABI for FastUpdatesIncentiveManager contract ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"},{"type":"address","name":"_addressUpdater","internalType":"address"},{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_sil","internalType":"SampleSize"},{"type":"uint256","name":"_ril","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_rip","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"event","name":"DailyAuthorizedInflationSet","inputs":[{"type":"uint256","name":"authorizedAmountWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceCallTimelocked","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256","indexed":false},{"type":"bytes","name":"encodedCall","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"GovernanceInitialised","inputs":[{"type":"address","name":"initialGovernance","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"GovernedProductionModeEntered","inputs":[{"type":"address","name":"governanceSettings","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"IncentiveOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"uint256","name":"rangeIncrease","internalType":"Range","indexed":false},{"type":"uint256","name":"sampleSizeIncrease","internalType":"SampleSize","indexed":false},{"type":"uint256","name":"offerAmount","internalType":"Fee","indexed":false}],"anonymous":false},{"type":"event","name":"InflationReceived","inputs":[{"type":"uint256","name":"amountReceivedWei","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"InflationRewardsOffered","inputs":[{"type":"uint24","name":"rewardEpochId","internalType":"uint24","indexed":true},{"type":"tuple[]","name":"feedConfigurations","internalType":"struct IFastUpdatesConfiguration.FeedConfiguration[]","indexed":false,"components":[{"type":"bytes21","name":"feedId","internalType":"bytes21"},{"type":"uint32","name":"rewardBandValue","internalType":"uint32"},{"type":"uint24","name":"inflationShare","internalType":"uint24"}]},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallCanceled","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TimelockedGovernanceCallExecuted","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"advance","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dailyAuthorizedInflation","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeGovernanceCall","inputs":[{"type":"bytes4","name":"_selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"fastUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IFastUpdatesConfiguration"}],"name":"fastUpdatesConfiguration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIFlareSystemsManager"}],"name":"flareSystemsManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"_addressUpdater","internalType":"address"}],"name":"getAddressUpdater","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getBaseScale","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getContractName","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"getCurrentSampleSizeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getExpectedBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"getExpectedSampleSize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getIncentiveDuration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getInflationAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Precision"}],"name":"getPrecision","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"getRange","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Scale"}],"name":"getScale","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_lockedFundsWei","internalType":"uint256"},{"type":"uint256","name":"_totalInflationAuthorizedWei","internalType":"uint256"},{"type":"uint256","name":"_totalClaimedWei","internalType":"uint256"}],"name":"getTokenPoolSupplyData","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IGovernanceSettings"}],"name":"governanceSettings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialise","inputs":[{"type":"address","name":"_governanceSettings","internalType":"contract IGovernanceSettings"},{"type":"address","name":"_initialGovernance","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExecutor","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationAuthorizationReceivedTs","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInflationReceivedTs","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"offerIncentive","inputs":[{"type":"tuple","name":"_offer","internalType":"struct IFastUpdateIncentiveManager.IncentiveOffer","components":[{"type":"uint256","name":"rangeIncrease","internalType":"Range"},{"type":"uint256","name":"rangeLimit","internalType":"Range"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"productionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Range"}],"name":"rangeIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"Fee"}],"name":"rangeIncreasePrice","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"receiveInflation","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIRewardManager"}],"name":"rewardManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"SampleSize"}],"name":"sampleIncreaseLimit","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDailyAuthorizedInflation","inputs":[{"type":"uint256","name":"_toAuthorizeWei","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIncentiveParameters","inputs":[{"type":"uint256","name":"_ss","internalType":"SampleSize"},{"type":"uint256","name":"_r","internalType":"Range"},{"type":"uint256","name":"_x","internalType":"Fee"},{"type":"uint256","name":"_dur","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"Range"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRangeIncreasePrice","inputs":[{"type":"uint256","name":"_price","internalType":"Fee"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSampleIncreaseLimit","inputs":[{"type":"uint256","name":"_lim","internalType":"SampleSize"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"switchToProductionMode","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"allowedAfterTimestamp","internalType":"uint256"},{"type":"bytes","name":"encodedCall","internalType":"bytes"}],"name":"timelockedCalls","inputs":[{"type":"bytes4","name":"selector","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationAuthorizedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationReceivedWei","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalInflationRewardsOfferedWei","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"triggerRewardEpochSwitchover","inputs":[{"type":"uint24","name":"_currentRewardEpochId","internalType":"uint24"},{"type":"uint64","name":"_currentRewardEpochExpectedEndTs","internalType":"uint64"},{"type":"uint64","name":"_rewardEpochDurationSeconds","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateContractAddresses","inputs":[{"type":"bytes32[]","name":"_contractNameHashes","internalType":"bytes32[]"},{"type":"address[]","name":"_contractAddresses","internalType":"address[]"}]}]' diff --git a/examples/developer-hub-rust/src/bin/chain_id_coston2.rs b/examples/developer-hub-rust/src/bin/chain_id_coston2.rs index 763f8f88..787e55d1 100644 --- a/examples/developer-hub-rust/src/bin/chain_id_coston2.rs +++ b/examples/developer-hub-rust/src/bin/chain_id_coston2.rs @@ -3,7 +3,7 @@ use eyre::Result; #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://rpc.ankr.com/flare_coston2".parse()?); + let provider = ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); let chain_id = provider.get_chain_id().await?; println!("Chain ID: {}", chain_id); // Chain ID: 114 Ok(()) diff --git a/examples/developer-hub-rust/src/bin/chain_id_flare.rs b/examples/developer-hub-rust/src/bin/chain_id_flare.rs index 587c3778..b6c79340 100644 --- a/examples/developer-hub-rust/src/bin/chain_id_flare.rs +++ b/examples/developer-hub-rust/src/bin/chain_id_flare.rs @@ -3,7 +3,7 @@ use eyre::Result; #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://rpc.ankr.com/flare".parse()?); + let provider = ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); let chain_id = provider.get_chain_id().await?; println!("Chain ID: {}", chain_id); // Chain ID: 14 Ok(()) diff --git a/examples/developer-hub-rust/src/bin/deploy_contract_coston2.rs b/examples/developer-hub-rust/src/bin/deploy_contract_coston2.rs index 5fec18a8..bc99f7e3 100644 --- a/examples/developer-hub-rust/src/bin/deploy_contract_coston2.rs +++ b/examples/developer-hub-rust/src/bin/deploy_contract_coston2.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { let provider = ProviderBuilder::new() .with_recommended_fillers() .wallet(wallet) - .on_http("https://rpc.ankr.com/flare_coston2".parse()?); + .on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); let contract = FtsoV2FeedConsumer::deploy(&provider).await?; println!("Deployed contract at address: {}", contract.address()); diff --git a/examples/developer-hub-rust/src/bin/deploy_contract_flare.rs b/examples/developer-hub-rust/src/bin/deploy_contract_flare.rs index 1a925260..50123e0f 100644 --- a/examples/developer-hub-rust/src/bin/deploy_contract_flare.rs +++ b/examples/developer-hub-rust/src/bin/deploy_contract_flare.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { let provider = ProviderBuilder::new() .with_recommended_fillers() .wallet(wallet) - .on_http("https://rpc.ankr.com/flare".parse()?); + .on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); let contract = FtsoV2FeedConsumer::deploy(&provider).await?; println!("Deployed contract at address: {}", contract.address()); diff --git a/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs b/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs index e002a032..ca2c81ae 100644 --- a/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs +++ b/examples/developer-hub-rust/src/bin/ftsov2_config_coston2.rs @@ -13,7 +13,7 @@ async fn main() -> Result<()> { // FastUpdatesConfiguration address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference let address = "0xE7d1D5D58cAE01a82b84989A931999Cb34A86B14".parse()?; - let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; + let rpc_url = "https://coston2-api.flare.network/ext/C/rpc".parse()?; // Connect to an RPC node let provider = ProviderBuilder::new().on_http(rpc_url); // Set up contract instance diff --git a/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs b/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs index 056e5703..f9d813e3 100644 --- a/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs +++ b/examples/developer-hub-rust/src/bin/ftsov2_consumer_coston2.rs @@ -13,7 +13,7 @@ async fn main() -> Result<()> { // FastUpdater address (Flare Testnet Coston2) // See https://dev.flare.network/ftso/solidity-reference let ftso_address = "0x58fb598EC6DB6901aA6F26a9A2087E9274128E59".parse()?; - let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; + let rpc_url = "https://coston2-api.flare.network/ext/C/rpc".parse()?; // Feed indexes: 0 = FLR/USD, 2 = BTC/USD, 9 = ETH/USD let feed_indexes = vec![U256::from(0_u32), U256::from(2_u32), U256::from(9_u32)]; // Connect to an RPC node diff --git a/examples/developer-hub-rust/src/bin/make_query_coston2.rs b/examples/developer-hub-rust/src/bin/make_query_coston2.rs index 3b6af8f5..943446e0 100644 --- a/examples/developer-hub-rust/src/bin/make_query_coston2.rs +++ b/examples/developer-hub-rust/src/bin/make_query_coston2.rs @@ -9,7 +9,7 @@ sol!( #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://rpc.ankr.com/flare_coston2".parse()?); + let provider = ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); let registry = FlareContractRegistry::new( "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019".parse()?, provider, diff --git a/examples/developer-hub-rust/src/bin/make_query_flare.rs b/examples/developer-hub-rust/src/bin/make_query_flare.rs index e4c052d9..09caf165 100644 --- a/examples/developer-hub-rust/src/bin/make_query_flare.rs +++ b/examples/developer-hub-rust/src/bin/make_query_flare.rs @@ -9,7 +9,7 @@ sol!( #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://rpc.ankr.com/flare".parse()?); + let provider = ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); let registry = FlareContractRegistry::new( "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019".parse()?, provider, diff --git a/examples/developer-hub-rust/src/bin/secure_random_coston2.rs b/examples/developer-hub-rust/src/bin/secure_random_coston2.rs index dbdc69f8..1659f7f1 100644 --- a/examples/developer-hub-rust/src/bin/secure_random_coston2.rs +++ b/examples/developer-hub-rust/src/bin/secure_random_coston2.rs @@ -13,7 +13,7 @@ async fn main() -> Result<()> { // Relay address where the secure RNG is served (Flare Testnet Coston2) // See https://dev.flare.network/network/solidity-reference let relay_address = "0x5CdF9eAF3EB8b44fB696984a1420B56A7575D250".parse()?; - let rpc_url = "https://rpc.ankr.com/flare_coston2".parse()?; + let rpc_url = "https://coston2-api.flare.network/ext/C/rpc".parse()?; // Connect to an RPC node let provider = ProviderBuilder::new().on_http(rpc_url); // Set up contract instance diff --git a/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs b/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs index 5a6d2374..f7b5fc9a 100644 --- a/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs +++ b/examples/developer-hub-rust/src/bin/volatility_incentive_coston2.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { let provider = ProviderBuilder::new() .with_recommended_fillers() .wallet(wallet) - .on_http("https://rpc.ankr.com/flare_coston2".parse()?); + .on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); // Set up contract instance let incentive = FastUpdatesIncentiveManager::new(incentive_address, provider); From d706f40bf30c78c076861f9acbae0840a0b461ad Mon Sep 17 00:00:00 2001 From: Dinesh Pinto Date: Wed, 17 Jul 2024 21:07:31 +0400 Subject: [PATCH 4/4] fix: formatting for JS and Rust --- examples/developer-hub-javascript/deploy_contract_coston2.js | 4 +++- examples/developer-hub-rust/src/bin/chain_id_coston2.rs | 3 ++- examples/developer-hub-rust/src/bin/chain_id_flare.rs | 3 ++- examples/developer-hub-rust/src/bin/make_query_coston2.rs | 3 ++- examples/developer-hub-rust/src/bin/make_query_flare.rs | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/developer-hub-javascript/deploy_contract_coston2.js b/examples/developer-hub-javascript/deploy_contract_coston2.js index c74ba6c7..9371dbd6 100644 --- a/examples/developer-hub-javascript/deploy_contract_coston2.js +++ b/examples/developer-hub-javascript/deploy_contract_coston2.js @@ -3,7 +3,9 @@ import { Web3 } from "web3"; import fs from "fs"; const web3 = new Web3( - new Web3.providers.HttpProvider("https://coston2-api.flare.network/ext/C/rpc"), + new Web3.providers.HttpProvider( + "https://coston2-api.flare.network/ext/C/rpc", + ), ); const bytecode = fs.readFileSync("./build/FtsoV2FeedConsumer.bin", "utf8"); diff --git a/examples/developer-hub-rust/src/bin/chain_id_coston2.rs b/examples/developer-hub-rust/src/bin/chain_id_coston2.rs index 787e55d1..be4d80c4 100644 --- a/examples/developer-hub-rust/src/bin/chain_id_coston2.rs +++ b/examples/developer-hub-rust/src/bin/chain_id_coston2.rs @@ -3,7 +3,8 @@ use eyre::Result; #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); + let provider = + ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); let chain_id = provider.get_chain_id().await?; println!("Chain ID: {}", chain_id); // Chain ID: 114 Ok(()) diff --git a/examples/developer-hub-rust/src/bin/chain_id_flare.rs b/examples/developer-hub-rust/src/bin/chain_id_flare.rs index b6c79340..d52f7679 100644 --- a/examples/developer-hub-rust/src/bin/chain_id_flare.rs +++ b/examples/developer-hub-rust/src/bin/chain_id_flare.rs @@ -3,7 +3,8 @@ use eyre::Result; #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); + let provider = + ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); let chain_id = provider.get_chain_id().await?; println!("Chain ID: {}", chain_id); // Chain ID: 14 Ok(()) diff --git a/examples/developer-hub-rust/src/bin/make_query_coston2.rs b/examples/developer-hub-rust/src/bin/make_query_coston2.rs index 943446e0..3882e6d5 100644 --- a/examples/developer-hub-rust/src/bin/make_query_coston2.rs +++ b/examples/developer-hub-rust/src/bin/make_query_coston2.rs @@ -9,7 +9,8 @@ sol!( #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); + let provider = + ProviderBuilder::new().on_http("https://coston2-api.flare.network/ext/C/rpc".parse()?); let registry = FlareContractRegistry::new( "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019".parse()?, provider, diff --git a/examples/developer-hub-rust/src/bin/make_query_flare.rs b/examples/developer-hub-rust/src/bin/make_query_flare.rs index 09caf165..1ead4ea9 100644 --- a/examples/developer-hub-rust/src/bin/make_query_flare.rs +++ b/examples/developer-hub-rust/src/bin/make_query_flare.rs @@ -9,7 +9,8 @@ sol!( #[tokio::main] async fn main() -> Result<()> { - let provider = ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); + let provider = + ProviderBuilder::new().on_http("https://flare-api.flare.network/ext/C/rpc".parse()?); let registry = FlareContractRegistry::new( "0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019".parse()?, provider,