Skip to content

feat: make GNS signal transferable #568

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 2 commits into from
Jul 27, 2022
Merged

feat: make GNS signal transferable #568

merged 2 commits into from
Jul 27, 2022

Conversation

tmigone
Copy link
Member

@tmigone tmigone commented May 16, 2022

See https://forum.thegraph.com/t/gip-0032-make-gns-signal-transferrable/3338

Motivation

From GIP32:

Curators can mint curation shares from a Subgraph Deployment directly on the Curation contract and get fully transferrable ERC20 shares. However, when they curate a Subgraph at the GNS level, the GNS contract is the one keeping all the signal shares under its control. The subgraph curators cannot transfer those shares because the GNS is not exposing any function to do that.

Changes

This PR adds a transferSignal function to the GNS contract that allows a curator to transfer ownership of their nSignal to another address.

Signed-off-by: Tomás Migone [email protected]

@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #568 (09f40d1) into dev (3da8723) will decrease coverage by 0.24%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #568      +/-   ##
==========================================
- Coverage   90.58%   90.34%   -0.25%     
==========================================
  Files          37       35       -2     
  Lines        1795     1760      -35     
  Branches      293      294       +1     
==========================================
- Hits         1626     1590      -36     
- Misses        169      170       +1     
Flag Coverage Δ
unittests 90.34% <100.00%> (-0.25%) ⬇️

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

Impacted Files Coverage Δ
contracts/discovery/GNS.sol 89.18% <100.00%> (+0.61%) ⬆️
contracts/rewards/RewardsManager.sol 95.95% <0.00%> (-4.05%) ⬇️
contracts/tests/testnet/GDAI.sol
contracts/tests/testnet/GSRManager.sol

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 3da8723...09f40d1. Read the comment docs.

@tmigone tmigone force-pushed the tmigone/gns-transfer branch from 306652e to dec52b9 Compare May 18, 2022 18:07
@tmigone tmigone requested a review from pcarranzav May 18, 2022 18:10
@tmigone tmigone force-pushed the tmigone/gns-transfer branch from dec52b9 to 40ca888 Compare May 18, 2022 18:26
abarmat
abarmat previously approved these changes May 19, 2022
Copy link
Contributor

@abarmat abarmat left a comment

Choose a reason for hiding this comment

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

This is ready for an audit

- Remove unused return value in transferSignal [N-22]
- Use single require statements in setSubgraphNFT [L-11]

Signed-off-by: Tomás Migone <[email protected]>
@tmigone
Copy link
Member Author

tmigone commented Jul 12, 2022

Latest commit 09f40d1 addresses audit issues N-22 and L-11

@abarmat abarmat merged commit 639f9cd into dev Jul 27, 2022
@abarmat abarmat deleted the tmigone/gns-transfer branch July 27, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants