Open HelmiTrabelsi opened 2 months ago
According to the Fireblocks SDK documentation (https://developers.fireblocks.com/reference/signing-a-request-jwt-structure) we need base url, X-API-Key, JWT. We tried to add this to our setRpcEndpoint but got 401 error.
new EvmBatchProcessor().setRpcEndpoint({
url: 'https://api.fireblocks.io/v1',
rateLimit: 10,
headers: {
'X-API-Key': 'XXXXXXXXXXXXXXX',
'Authorization': 'Bearer JWT'
})
@HelmiTrabelsi just to make sure, does fireblocks support rpc methods other than those releted to transactions signing? e.g eth_blockNumber
Initially I checked the wrong package, but from the provider package you are importing, it looks like they are requested bypassing fireblocks sdk class and authorization for those methods are not needed at all, except some optional Authorization header formed from the creds in a url itself https://github.com/fireblocks/fireblocks-web3-provider/blob/c0ee722f103548b26ef1317bf00f660d962cc603/src/provider.ts#L337 https://github.com/fireblocks/fireblocks-web3-provider/blob/c0ee722f103548b26ef1317bf00f660d962cc603/src/provider.ts#L75
As we are paying for Fireblocks services, including the Fireblocks Web3 provider, we want to use this service in the indexer to avoid paying for another Web3 provider. However, we could not use it because squid-SDK only supports RPC URLs.
These changes allow the use of Fireblocks as a Web3 infrastructure provider in the Squid-SDK by making changes to the rpc-client and evm-processor packages. This update also facilitates using any other Web3 infrastructure provider that doesn't support RPC URLs.