-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix invite script by moving to contractkit #1645
Conversation
console.log(`Using account: ${account}`) | ||
kit.defaultAccount = account | ||
|
||
// TODO(asa): This number was made up |
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.
Feels dangerous but I guess it's been working for us
const verificationFee = new BigNumber( | ||
await attestations.attestationRequestFees(stableToken.address) | ||
) | ||
const goldAmount = verificationGasAmount.times(gasPrice).toString() |
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.
We don't need to send gold anymore at all, do we?
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.
I'm not sure if anyone uses this + pays gas in gold so I just added a comment to remove it - just hesitant to do it when not everyone will have a chance to look at this
Codecov Report
@@ Coverage Diff @@
## master #1645 +/- ##
========================================
Coverage 74.23% 74.23%
========================================
Files 287 287
Lines 7704 7704
Branches 667 960 +293
========================================
Hits 5719 5719
Misses 1871 1871
Partials 114 114
Continue to review full report at Codecov.
|
) | ||
await Promise.all([ | ||
// TODO: remove if no one is paying for gas with gold | ||
goldToken.transfer(temporaryAddress, goldAmount).sendAndWaitForReceipt(), |
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.
Yeah, i think your comment is right. The invite doesn't actually need to send gold.
kit.defaultAccount = account | ||
|
||
// TODO(asa): This number was made up | ||
const attestationGasAmount = new BigNumber(10000000) |
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.
Pretty sure we can cut this and the gold related parts too
Description
Invite script was broken so just decided to move to celotool + contractkit
Tested
Ran locally and got a text with a valid invite
Backwards compatibility
Shouldn't break anything