Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements and tech-debt #121

Merged
merged 22 commits into from
Mar 1, 2024
Merged

General improvements and tech-debt #121

merged 22 commits into from
Mar 1, 2024

Conversation

devbugging
Copy link
Contributor

General improvements to the code, addressing some todos, removing non-relevant todos, concurrently get data from network, improve balance conversions...

@devbugging devbugging self-assigned this Mar 1, 2024
@devbugging devbugging requested a review from m-Peter March 1, 2024 15:32
flag.StringVar(&coinbase, "coinbase", "", "coinbase address to use for fee collection")
flag.StringVar(&gas, "gas-price", "1", "static gas price used for EVM transactions")
flag.StringVar(&flowChainID, "flow-network-id", "flow-emulator", "Flow network ID (flow-emulator, flow-previewnet)")
flag.StringVar(&coinbase, "coinbase", "", "Coinbase address to use for fee collection")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit out of context of this PR, but it occurred to me that we might better fetch this from the COA resource that resides in the coa-address. We can do this either through a script on startup and memoize the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh you are right, can you open an issue for this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #122

index int
seqNum uint64
)
// execute concurrently so we can speed up all the information we need for tx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👏

}
// make the list of all contracts we should replace address for
sc := systemcontracts.SystemContractsForChain(e.chainID)
contracts := []systemcontracts.SystemContract{sc.EVMContract, sc.FungibleToken, sc.FlowToken}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 😍

Copy link
Collaborator

@m-Peter m-Peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice cleanup 💯

return flow.EmptyID, fmt.Errorf("failed to sign envelope: %w", err)
}

err = e.client.SendTransaction(ctx, *flowTx)
if err != nil {
err := e.client.SendTransaction(ctx, *flowTx)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
err := e.client.SendTransaction(ctx, *flowTx)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sideninja ^

@devbugging devbugging merged commit 816b5b7 into main Mar 1, 2024
1 check passed
@m-Peter m-Peter deleted the gregor/tech-debt branch March 8, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants