-
Notifications
You must be signed in to change notification settings - Fork 21
NFT Reward Contribution Mechanism #8
Comments
👋 Hey @cloudhead @sebastinez, would love to help in any capacity on this issue. I'm in the discord channel if you want to connect. |
Great start. I think it would be useful to lay out what the method call might look like when the contributor claims their reward. Besides that, it all makes sense to me. |
I agree that EIP-712 would be the best way to go about displaying user signed information and efficiently verifying the payload. I'm happy to work on a PR for I can work on adding async fn sign_typed_data(&self, data: &TypedData, address: &Address) -> Result<Signature, Self::Error>; I imagine TypedData would implement Serialize/Deserialize between JSON and the Struct and have additional helper / verification methods. If this sounds good to you both, happy to get started on it. |
Hey @Ryanmtate yeah I think that would be great! |
Thanks @sebastinez! I think a custom derive would be great for this. I'll work toward an implementation and continue to review the other libraries mentioned in the thread. |
@sebastinez @cloudhead getting closer to having Eip712 derive merged into ethers-rs-- opened a draft PR gakonst/ethers-rs#481 for early feedback. Still have to work on test coverage and verify accuracy against solidity contract and EIP specification. Some features, such as nested struct encoding is not there yet, but is on my radar for implementation. Would love your feedback! |
Quick update on the Eip712 derive macro. Getting closer to landing it. |
This issue has been deprioritized since we are working on ways to award contributors with rewards offchain by looking at the git repositories instead of creating onchain transactions for each reward/contributor. |
Abstract
This issue details the implementation of a proof of contribution mechanism, that would allow a user to claim a NFT showing his contribution through a commit to a specific organization.
Glossary
Discovery
Creation
With a commit found through the discovery mechanism, an org MAY create an offchain proof.
The message to be signed MUST follow this pattern:
The org MUST hash the message with SHA256, sign the resulting hash by all its members and provide the resulting signatures:
Example of a proof for a single owner org
Example of a proof for a multi-sig org
Once signed by all the members, the proof MAY be stored as git-notes in the corresponding repository.
/refs/notes/contributions/
, and can be seen in the git commit for example:Claim
Mint
msg.sender == proof.receiver
org.owner == ecreover(proof.msg, proof.sig)
tokenId
gets created on-chain and the payload gets assigned astokenURI
of the token.Transfer
event gets emitted and the CLI will display thetokenId
for the contributor.The text was updated successfully, but these errors were encountered: