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

10 create get fct to retrieve website on the blockchain #45

Merged

Conversation

thomas-senechal
Copy link
Member

No description provided.

@thomas-senechal thomas-senechal linked an issue Jul 25, 2024 that may be closed by this pull request
3 tasks
@thomas-senechal thomas-senechal marked this pull request as ready for review July 25, 2024 06:26

// getNumberOfChunks fetches and returns the number of chunks for the website.
func getNumberOfChunks(client *node.Client, websiteAddress string) (int32, error) {
nbChunkResponse, err := node.FetchDatastoreEntry(client, websiteAddress, convert.ToBytes(nbChunkKey))
Copy link

Choose a reason for hiding this comment

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

here you read directly the storage, but you can call a function in readonly

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't have a function to get this information
That's why we read the value in datastore directly

pkg/website/read.go Outdated Show resolved Hide resolved
@thomas-senechal thomas-senechal merged commit 93a4f7a into main Jul 25, 2024
6 checks passed
@thomas-senechal thomas-senechal deleted the 10-create-get-fct-to-retrieve-website-on-the-blockchain branch August 10, 2024 08:07
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.

Create GET fct to retrieve website on the blockchain
3 participants