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

Store proposals on IPFS #90

Closed
tupui opened this issue Nov 14, 2024 · 9 comments · Fixed by #95
Closed

Store proposals on IPFS #90

tupui opened this issue Nov 14, 2024 · 9 comments · Fixed by #95
Labels
dao enhancement New feature or request

Comments

@tupui
Copy link
Owner

tupui commented Nov 14, 2024

Relates to #83 (comment)

Send the proposal to IPFS with Storacha to the DID of the project (https://docs.storacha.network/how-to/upload/). The proposal is a markdown file and can have images.

Here is an example of proposal

https://bafybeidsfg2rfmpgtisfnmk6lur5dmy6j4kwjblh2rhme6nrsvjcaci4jq.ipfs.w3s.link

To store the possible actions in XDR form. I think the best would be to store a json file (I will make an example tomorrow and provide another IPFS link.) This JSON file need to be loaded and displayed at the bottom of the proposal.

{
	"approved": {
		"description": "What happens if this proposal is approved",
		"xdr": "AAAAAgAAAABiu...="
	},
	"rejected": {
		"description": "What happens if this proposal is rejected",
		"xdr": "AAAAAgAAAABiu...="
	},
	"cancelled": {
		"description": "What happens if this proposal is cancelled",
		"xdr": "AAAAAgAAAABiu...="
	}
}

The XDR field is optional.

See the laboratory for some XDR example. We are storing in the JSON files the XDR as a string. But in the UI we are only interested in displaying the JSON form. The XDR should be a collapsible and scrollable as it can be long.

@tupui tupui added enhancement New feature or request dao labels Nov 14, 2024
@0xExp-po
Copy link
Contributor

Hey, @tupui
in the IPFS, is the proposal description file name proposal.md whenever?

@0xExp-po
Copy link
Contributor

also, the action JSON data, is it stored as another file in IPFS?
then what is the file name?

@tupui
Copy link
Owner Author

tupui commented Nov 14, 2024

Yes the proposal should always be proposal.md. When a user will create a proposal, it should create this file and send it to IPFS.

For the JSON data, I will make a new link with everything to show.

Let's call the file, outcomes.json

@0xExp-po
Copy link
Contributor

in the outcome, should I display the XDR data or decoded data of it?

@tupui
Copy link
Owner Author

tupui commented Nov 15, 2024

We only display the decoded data. So json. We do t need to show the XDR itself there.

What we will need is to add a link somewhere on the page to see the files on IPFS. This way people can verify for themselves everything if they want to.

@tupui
Copy link
Owner Author

tupui commented Nov 15, 2024

Here is the new link with outcomes:

https://bafybeigstnjnededvbckmvlmodpw2m745i5lidmyttb4u7o6ouiudokbx4.ipfs.w3s.link

@0xExp-po
Copy link
Contributor

then I'll add 'link' icon to the beside of the titles 'Proposal Description' and 'Proposal Outcome'
the links will be like these for example with the above ipfs link

https://bafybeigstnjnededvbckmvlmodpw2m745i5lidmyttb4u7o6ouiudokbx4.ipfs.w3s.link/proposal.md
https://bafybeigstnjnededvbckmvlmodpw2m745i5lidmyttb4u7o6ouiudokbx4.ipfs.w3s.link/outcomes.json

@0xExp-po
Copy link
Contributor

like this
image

and this
image

@tupui
Copy link
Owner Author

tupui commented Nov 20, 2024

That works 👍

@tupui tupui linked a pull request Dec 1, 2024 that will close this issue
@tupui tupui closed this as completed in #95 Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dao enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants