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

Update faucet to pull from the reserve when possible #1844

Merged
merged 3 commits into from
Nov 25, 2019

Conversation

asaj
Copy link
Contributor

@asaj asaj commented Nov 23, 2019

Description

This PR makes validator0 a reserve spender by default, and updates the faucet celotool command to pull from the reserve if the account is authorized to do so.

Tested

Not tested.

Other changes

  • Require faucet amounts to be specified explicitly.

Related issues

])
const goldAmount = await convertToContractDecimals(argv.gold, goldToken)
const stableTokenAmount = await convertToContractDecimals(argv.dollars, stableToken)
console.log(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: might be nice to break this into three so we can see if/when the {gold from account, gold from reserve, C$ from account} transfers are made

await goldToken.transfer(address, goldAmount.toFixed()).sendAndWaitForReceipt()
}
}
if (stableTokenAmount.isZero()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably future work, but without a separate faucet account we can't faucet C$ right now - but could if we spent from reserve then exchanged.

@asaj asaj added the automerge Have PR merge automatically when checks pass label Nov 25, 2019
@asaj asaj assigned asaj and unassigned timmoreton Nov 25, 2019
@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #1844 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1844    +/-   ##
=======================================
  Coverage    74.2%   74.2%            
=======================================
  Files         278     278            
  Lines        7653    7653            
  Branches      672     956   +284     
=======================================
  Hits         5679    5679            
  Misses       1857    1857            
  Partials      117     117
Flag Coverage Δ
#mobile 74.2% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc70435...fcca7fe. Read the comment docs.

@celo-ci-bot-user celo-ci-bot-user merged commit f7d2899 into master Nov 25, 2019
@celo-ci-bot-user celo-ci-bot-user deleted the asaj/faucet branch November 25, 2019 01:33
aaronmgdr added a commit that referenced this pull request Nov 26, 2019
* master: (61 commits)
  [Wallet] Handle `/v/<code` deep links for phone verifications (#1776)
  Patch tslint auto fix for macOS Catalina until tslint#6.x is out (#1802)
  Fix typos (#1855)
  Update documentation sidebar (#1861)
  [Wallet] Update forno dev documentation (#1818)
  [Docs] Correct typo
  Validator UX docs for baklava network (#1688) (#1849)
  Various improvements to the CLI, allow voters to revote for a group (#1840)
  Serialize to hex string (#1848)
  Update faucet to pull from the reserve when possible (#1844)
  Fix elect validators migration, deploy integration (#1847)
  Configurable genesis balances (#1838)
  Deploy new version of Celostats and minnor change from celo-blockchain (#1714)
  Make default node URL consistent in celocli (#1805)
  Onboarding feedback (#1811)
  return at least true, when the function is returning bool (#1825)
  Minor Contractkit changes (#1819)
  Point end-to-end tests back to master (#1824)
  Update migration config to correct protocol parameters (#1822)
  Update with new istanbul lookback window size flag (#1820)
  ...

# Conflicts:
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --from-reserve to celotool faucet
3 participants