-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat!: add support for dynamic configurables #1555
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
Open
hal3e
wants to merge
55
commits into
master
Choose a base branch
from
hal3e/dynamic-configurables
base: master
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.
Open
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
9879875
update fuel-abi-types
hal3e 2ab1409
update
hal3e 0f32147
Work in progress
hal3e 8715d1c
feat!: add support for dynamic configurables
hal3e 82412bc
update ciyml
hal3e 4675e3f
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 542d272
merge master
hal3e 54a7842
refactor code
hal3e 1fb0acb
refactor code
hal3e 9f34af8
Work in progress
hal3e 606d9fe
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 692edea
fix fmt
hal3e 3253173
Merge branch 'master' into hal3e/dynamic-configurables
hal3e e42c91a
bump fuel-abi-types
hal3e 94efe89
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 9d8e166
forc fmt
hal3e 1f3989d
fix typos
hal3e 9decbcf
Merge branch 'master' into hal3e/dynamic-configurables
hal3e b37ed25
updates
hal3e 2991da7
fix todos
hal3e 45238c2
small improvements
hal3e c5da416
merge master
hal3e 1fdb690
Work in progress
hal3e b14b1c9
Merge branch 'master' into hal3e/dynamic-configurables
hal3e a0aeffe
add tests
hal3e 186137f
var names
hal3e 11334ca
add documentation
hal3e 9305b02
mdbook fix error
hal3e bd18d82
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 58dc776
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 033c4b4
feat: switch blob ID calculation from data offset to configurable off…
Salka1988 71c5f92
chore: update `forc` to `0.66.7` (#1596)
hal3e 11d08e1
chore: update sway's counter example (#1601)
hal3e e1095cd
chore!: bump `fuel-core-*` versions (#1600)
segfault-magnet 77fb33a
merge master
hal3e 685e5dd
PR comments 1st version
hal3e 3b64c60
refactor
hal3e 110ae71
Merge branch 'master' into hal3e/dynamic-configurables
MujkicA dd0bc27
merge master
hal3e 6d607cd
fix fee todos
hal3e b6dbd0a
remove dbg
hal3e fc9fc4e
Apply suggestions from code review
hal3e 40afe0e
add fn docstring
hal3e da65b6c
merge master
hal3e b382e17
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 7d1ee87
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 97fd0b8
work in progress
hal3e 70c0be8
merge master
hal3e 040a4d0
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 398588e
Merge branch 'master' into hal3e/dynamic-configurables
hal3e 13d2317
add documentation
hal3e fa7cc9c
add docstring
hal3e 5ca433d
pr comments
hal3e bf24659
fix spelling
hal3e 1e0dc14
cargo fmt
hal3e 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "dyn_configurables" |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
contract; | ||
|
||
configurable { | ||
BOOL: bool = true, | ||
U8: u8 = 8, | ||
STR: str = "sway", | ||
STR_2: str = "forc", | ||
STR_3: str = "fuel", | ||
LAST_U8: u8 = 16, | ||
} | ||
|
||
abi TestContract { | ||
fn return_configurables() -> (bool, u8, str, str, str, u8); | ||
} | ||
|
||
impl TestContract for Contract { | ||
fn return_configurables() -> (bool, u8, str, str, str, u8) { | ||
(BOOL, U8, STR, STR_2, STR_3, LAST_U8) | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "predicate_dyn_configurables" |
21 changes: 21 additions & 0 deletions
21
e2e/sway/predicates/predicate_dyn_configurables/src/main.sw
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
predicate; | ||
|
||
configurable { | ||
BOOL: bool = true, | ||
U8: u8 = 8, | ||
STR: str = "sway", | ||
STR_2: str = "forc", | ||
STR_3: str = "fuel", | ||
LAST_U8: u8 = 16, | ||
} | ||
|
||
fn main( | ||
some_bool: bool, | ||
some_u8: u8, | ||
some_str: str, | ||
some_str_2: str, | ||
some_str_3: str, | ||
some_last_u8: u8, | ||
) -> bool { | ||
some_bool == BOOL && some_u8 == U8 && some_str == STR && some_str_2 == STR_2 && some_str_3 == STR_3 && some_last_u8 == LAST_U8 | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "script_dyn_configurables" |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
script; | ||
|
||
configurable { | ||
BOOL: bool = true, | ||
U8: u8 = 8, | ||
STR: str = "sway", | ||
STR_2: str = "forc", | ||
STR_3: str = "fuel", | ||
LAST_U8: u8 = 16, | ||
} | ||
|
||
fn main() -> (bool, u8, str, str, str, u8) { | ||
(BOOL, U8, STR, STR_2, STR_3, LAST_U8) | ||
} |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.