It sounds happy that we have just merged code into ready branch for deploying. And tester team can start test around great features that we have just built
I have just spent more time to review about feeder tool for our team. This may not important more than the code of portal v2 in node app, but you guys can support me with some of my suggestion.
1/ We can consider change this import to the same format with other repo
that mean “github.com/incognitochain/incognito-portal-feeders/…”. I think this is the same way we often use
2/ We reuse a lot utils.NewHttpClient(…) in main.go for
we can consider change a little bit here: os.Getenv(“INCOGNITO_PROTOCOL”), os.Getenv(“INCOGNITO_HOST”), os.Getenv(“INCOGNITO_PORT”); not repeat again on every agents
3/ I think here
we try to distinguish mainnet and testnet, so can we apply something like this. In this way, we can extend more param when needing to use testnet / mainnet. I mean Network, maybe it is an object with 1st property is string Name(mainnet/testnet), and 2nd … something else
4/ I think some string or number that we can move into same file constants.go. In this way, we can find it fastly when we want to update
5/ If having more time, can we get log utils
and reuse instead of using fmt for the same format
6/ Maybe I not understand about logic of code here
but can we merge for at line 127 with line 143, line 157(1 loop ‘for’ for 3 logic )?
7/ Why did we use int64 here?
can we use uint64? Cause this is height of block. like this
8/ We consider that can we use maps into here? Because it is actually easy to use if we have demand to built API to get info from this tool
const name_coin = ‘name_coin’
map[name_coin] = ‘token ID’
Maybe some of my suggestions are not clear, you can ask me if you not understand. The fact that it is only suggestions so that you can review and make decisions on it