Skip to content

Simplify GRE account logic #655

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

Merged
merged 4 commits into from
Jul 28, 2022
Merged

Simplify GRE account logic #655

merged 4 commits into from
Jul 28, 2022

Conversation

tmigone
Copy link
Member

@tmigone tmigone commented Jul 28, 2022

Couple of changes to simplify GRE code:

  • Use hardhat's SignerWithAddress instead of our own Account. This is the same account abstraction but widely used by hardhat so there is no point in redefining it.

  • getNamedAccounts will now always read the named account addresses from the graph config file and initialize a SignerWithAddress. This will succeed regardless of wether we hold the private key/mnemonic for the account or not, so we can remove the VoidSigner logic to further simplify. If we don't have the private key the signer simply won't be able to sign any transactions.

@tmigone tmigone marked this pull request as draft July 28, 2022 09:28
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #655 (ea54cd6) into dev (35aa936) will not change coverage.
The diff coverage is n/a.

❗ Current head ea54cd6 differs from pull request most recent head 516e8d8. Consider uploading reports for the commit 516e8d8 to get more accurate results

@@           Coverage Diff           @@
##              dev     #655   +/-   ##
=======================================
  Coverage   90.35%   90.35%           
=======================================
  Files          35       35           
  Lines        1762     1762           
  Branches      296      296           
=======================================
  Hits         1592     1592           
  Misses        170      170           
Flag Coverage Δ
unittests 90.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 35aa936...516e8d8. Read the comment docs.

@tmigone tmigone marked this pull request as ready for review July 28, 2022 10:35
@tmigone tmigone marked this pull request as draft July 28, 2022 10:35
@tmigone tmigone marked this pull request as ready for review July 28, 2022 11:39
@tmigone tmigone force-pushed the tmigone/gre-accounts2 branch from ea54cd6 to 516e8d8 Compare July 28, 2022 13:27
@tmigone tmigone merged commit 16a1387 into dev Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants