-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Current Behavior
Calling await FLIXGenerators.template(...)
with dependencies from multiple networks (testnet and mainnet) will result in error:
throw new HTTPRequestError({
^
HTTPRequestError [HTTP Request Error]:
HTTP Request Error: An error occurred when interacting with the Access API.
error=rpc error: code = InvalidArgument desc = address 8f9231920da9af6d is invalid for chain flow-testnet
hostname=https://rest-testnet.onflow.org
path=/v1/accounts/8f9231920da9af6d?block_height=138556193&expand=contracts,keys
method=GET
responseBody={
"code": 400,
"message": "rpc error: code = InvalidArgument desc = address 8f9231920da9af6d is invalid for chain flow-testnet"
}
responseStatusText=Bad Request
statusCode=400
Expected Behavior
I understand this is probably happening because I can only configure FCL for one network at a time (which I need to do to call FLIXGenerators.template
), so it can't resolve addresses from other networks.
But I wonder if there is a way we could avoid this limitation so that multi-network template generation would still work in this way.
Otherwise, I believe developers would need to first generate templates for each network separately and then combine them.
For reference, this is the code I'm using: blocto/flow-transactions#60.
Steps To Reproduce
Run this script: https://github.com/onflowser/blocto-flow-transactions/blob/flix-migration/internal/migrateToFlix.js
What are you currently working on that this is blocking?
I'm trying to migrate Blocto's transaction collection to FLIX (blocto/flow-transactions#59).