hyperledger / firefly-cli

FireFly Command Line Interface (CLI)
Apache License 2.0
58 stars 55 forks source link

Remote RPC Erc1155 Token Connector CLI check #237

Open monar24 opened 1 year ago

monar24 commented 1 year ago

Currently initializing a remote blockchain stack with an erc-1155 token connector as follows:

ff init polygon 1 \
    --multiparty=false \
    -b ethereum \
    -c evmconnect \
    -n remote-rpc \
    -t erc1155 \
    --remote-node-url https://staging.arkane.network/\
    --chain-id 80001 \
    --connector-config ~/Desktop/evmconnect.yml

Throws the following due to a check in the CLI: https://github.com/hyperledger/firefly-cli/blob/8ad18381273eaea05575955bdc77aef6614d3c81/cmd/init.go#L216

This check was created to prevent automatic deployment of factory contracts for erc1155.

Steps for solution: 1- Build CLI with check disabled 2- Address any issues that arise from the CLI or connector

awrichar commented 1 year ago

From a very quick look, I think removing this check from the CLI may actually behave alright (from a CLI perspective). The main thing there is to be sure it doesn't try to auto-deploy any contracts... seems like it won't, but worth a double-check.

I think the bigger issue may be that the https://github.com/hyperledger/firefly-tokens-erc1155 container will have issues if it's started without a CONTRACT_ADDRESS or ETHCONNECT_INSTANCE. There's no reason it can't function without a built-in factory now (because you can point it at the address of one with each pool you create) - but I think it was coded to not come up unless it has a pre-deployed contract.