-
Notifications
You must be signed in to change notification settings - Fork 340
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
chequebook: remove erc20 bindings #1362
Conversation
28828d4
to
7efc2a6
Compare
30cff89
to
5399c7d
Compare
5399c7d
to
db21eb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments
@@ -138,7 +131,7 @@ func Init( | |||
if err == storage.ErrNotFound { | |||
logger.Info("no chequebook found, deploying new one.") | |||
if swapInitialDeposit.Cmp(big.NewInt(0)) != 0 { | |||
err = checkBalance(ctx, logger, swapInitialDeposit, swapBackend, chainId, overlayEthAddress, erc20BindingFunc, erc20Address, 20*time.Second, 10) | |||
err = checkBalance(ctx, logger, swapInitialDeposit, swapBackend, chainId, overlayEthAddress, erc20Service, 20*time.Second, 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extract the last two arguments to be declared at the beginning of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. as they are constants I also removed them as arguments.
request := &transaction.TxRequest{ | ||
To: &c.address, | ||
Data: callData, | ||
GasPrice: nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the GasPrice
is nil
and GasLimit
is 0
then what happens to the transaction once it gets sent? Not really clear what is the expected behavior here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are the values for the transaction request, not the transaction itself. gas price nil means the transaction service will query the ethereum node for a gas price, gas limit 0 means it will do a gas estimation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool. maybe good to document this inline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat
97afd5a
to
bc94d18
Compare
/run beekeeper |
this is the third in a series of PRs which remove the use of abigen-generated bindings in favour of just using the few things we need directly building on top of #1361.
This PR
storage-incentives
where some code is currently duplicated)