-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(contract): Add range field to Resource #234
Draft
Tzal3x
wants to merge
7
commits into
gg/move/upgrade
Choose a base branch
from
170-feature-store-multiple-site-resources-as-a-single-blob
base: gg/move/upgrade
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+699
−214
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4659319
chore(move): upgrade to Move 2024 and publish new contract
giac-mysten 2884852
fix(portal): remove unused arg
giac-mysten 46823e7
feat: add routes to contract
giac-mysten 2d73a23
refactor: streamline site diffing in preparation to routes
giac-mysten 57fb4bd
feat(move/site-builder): add routes
giac-mysten f04754c
feat: parse the routes from sui + correct summarization
giac-mysten bae3ec9
Add range field to Resource
Tzal3x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[package] | ||
name = "walrus_site" | ||
license = "Apache-2.0" | ||
authors = ["Mysten Labs <[email protected]>"] | ||
version = "0.0.1" | ||
edition = "2024.beta" | ||
|
||
[dependencies] | ||
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export const NETWORK = "testnet" | ||
export const AGGREGATOR = "https://aggregator-devnet.walrus.space:443" | ||
export const SITE_PACKAGE = "0xe15cd956d3f54ad0b6608b01b96e9999d66552dfd025e698ac16cd0df1787a25" | ||
export const MAX_REDIRECT_DEPTH = 3 | ||
export const NETWORK = "testnet"; | ||
export const AGGREGATOR = "https://aggregator-devnet.walrus.space:443"; | ||
export const SITE_PACKAGE = "0xee40a3dddc38e3c9f594f74f85ae3bda75b0ed05c6f2359554126409cf7e8e9d"; | ||
export const MAX_REDIRECT_DEPTH = 3; | ||
export const SITE_NAMES: { [key: string]: string } = { | ||
// Any hardcoded (non suins) name -> object_id mappings go here | ||
// e.g., | ||
// landing: "0x1234..." | ||
}; | ||
// The default portal to redirect to if the browser does not support service workers. | ||
export const FALLBACK_PORTAL = "blob.store" | ||
export const FALLBACK_PORTAL = "blob.store"; | ||
// The string representing the ResourcePath struct in the walrus_site package. | ||
export const RESOURCE_PATH_MOVE_TYPE = SITE_PACKAGE + "::site::ResourcePath"; | ||
|
||
const LANDING_PAGE_OID = '0x2d9414edc309535bfd4cd7e80ccbc09fee18bf86b449a185b81e914096059a67'; | ||
const FLATLAND_OID = '0xc62fae899d75705d88ef282678d17abc08a3363293def8841f0113aabd053fbb'; | ||
const FLATLANDER_OID = '0xabf413f36aa8ba984f81f4d3e334070b351c800dacb5ea5e02d49a7621b02d96'; | ||
const LANDING_PAGE_OID = "0x2d9414edc309535bfd4cd7e80ccbc09fee18bf86b449a185b81e914096059a67"; | ||
const FLATLAND_OID = "0xc62fae899d75705d88ef282678d17abc08a3363293def8841f0113aabd053fbb"; | ||
const FLATLANDER_OID = "0xabf413f36aa8ba984f81f4d3e334070b351c800dacb5ea5e02d49a7621b02d96"; | ||
export const SITES_USED_FOR_BENCHING = [ | ||
[LANDING_PAGE_OID, "landing page"], | ||
[FLATLAND_OID, "flatland"], | ||
[FLATLANDER_OID, "flatlander"] | ||
] | ||
[FLATLANDER_OID, "flatlander"], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why use an
Option<vector<u256>>
? Can we use tuples? I don't remember if move allows them.Suggestion: If it does not, we could strongly type it instead as
Range { start: Option<u256>, end: Option<u256> }
. Then, add anOption<Range>
to theResource
. This may be a bit more readable and easy to parse? And also we don't need the length checks.