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

WIP: Hyperboard contract #1068

Open
wants to merge 32 commits into
base: develop-contracts
Choose a base branch
from

Conversation

Abhimanyu121
Copy link

@Abhimanyu121 Abhimanyu121 commented Sep 17, 2023

This is a WIP PR, so I will be pushing more things to it with time.
HyperboardNFT contract mints new Hyperboard NFT, it prepares a URI using the base IPFS hash of the webpage + some URL parameters that the webpage can use to show the data.

@Abhimanyu121
Copy link
Author

Just added a function to update the base URI as well, I am not sure if updating the base URI is a good idea or not. I can remove it if needed.

@benedictvscriticus benedictvscriticus linked an issue Sep 19, 2023 that may be closed by this pull request
Copy link
Contributor

@bitbeckers bitbeckers left a comment

Choose a reason for hiding this comment

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

Thanks for this! Most of the comments above are not breaking, and since the hyperboard is currently 'only' a registry I think this a good PoC to roll with. There are things to mature, but I don't see any big issues at the moment.

When this actually rolls out, we can give the code a more thorough review. Plus add the test cases for the Graph ;)

graph/networks.json Outdated Show resolved Hide resolved
graph/tests/contract.test.ts Outdated Show resolved Hide resolved
graph/tests/contract-utils.ts Outdated Show resolved Hide resolved
}


type Hypercert @entity {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of this specific entity? From my understanding, the hyperboard links to a claim (e.g. an uncertified hypercert), which in this case can be refered to using the Claim entity

graph/schema.graphql Show resolved Hide resolved
contracts/src/libs/Errors.sol Outdated Show resolved Hide resolved
contracts/src/libs/Errors.sol Outdated Show resolved Hide resolved
/// @author Abhimanyu Shekhawat
/// @notice This is an NFT for representing various hyperboards
contract Hyperboard is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, EIP712 {
string public subgraphEndpoint;
Copy link
Contributor

@bitbeckers bitbeckers Oct 10, 2023

Choose a reason for hiding this comment

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

This variable is used for the dynamic NFT we specced out, correct? I think this setup is tricky because a change in the subgraph endpoints would result in a breaking change. To compare, an ipfs:// URL can be mapped to a gateway, but subgraphs don't follow these kind of standards I believe.

One solution could be a central registry for the IPFS uri so that the rendered page and the subgraph URL can be governed on a protocol level.

nvm, the contract is the central registry. Still, maybe we can find a way around something like the Graph.

What do you think?

P.S. this is something beyond PoC scope, but we should be aware of the implications.

contracts/src/hyperboards/HyperboardNFT.sol Outdated Show resolved Hide resolved
contracts/src/hyperboards/HyperboardNFT.sol Show resolved Hide resolved
@bitbeckers bitbeckers changed the base branch from develop to develop-contracts October 17, 2023 12:49
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.

TASK: Design Hyperboard minter
3 participants