-
Notifications
You must be signed in to change notification settings - Fork 5.4k
contract self implementation #7030
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
hey-ewan
wants to merge
26
commits into
FuelLabs:master
Choose a base branch
from
hey-ewan:contract-self-impl
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 11 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e5a5bcc
feat: anonymuos abi for contract self impl
hey-ewan 167c7f8
refactor: live swaylang test
hey-ewan 36f83ca
code comments
hey-ewan 1ec63fc
Merge branch 'master' into contract-self-impl
hey-ewan 25b03ab
reversed altered test
hey-ewan 722eac6
fix: breaking changes
hey-ewan 492cf37
Merge branch 'master' into contract-self-impl
hey-ewan a09c390
Merge branch 'master' into contract-self-impl
hey-ewan a2c4e25
refactor: `__AnonymousAbi_{}` > `_AnonymousAbi_{}`
hey-ewan 6902f46
`contract_abi_auto_impl` test
hey-ewan 8c76a52
fix: forced `_AnonymousAbi_N` generation
hey-ewan 79b1ea2
removed `std` dep from test
hey-ewan 1bcc27e
fix: bad tests
hey-ewan 1ef79a5
Merge branch 'master' into contract-self-impl
hey-ewan 6787f51
fix: breaking changes
hey-ewan 57a41e3
Merge branch 'master' into contract-self-impl
IGI-111 4026959
fix: breaking changes
hey-ewan 2d5a8cc
Merge branch 'master' into contract-self-impl
hey-ewan e03feea
Merge branch 'master' into contract-self-impl
hey-ewan 68bdc9a
refactor: included `validate_abi` to `test.toml`
hey-ewan 9698e97
Merge branch 'master' into contract-self-impl
hey-ewan 5255d0a
chore: derive names from project manifest `Forc.toml`
hey-ewan ab8ecd7
Merge branch 'master' into contract-self-impl
hey-ewan 702ea46
Merge branch 'master' into contract-self-impl
hey-ewan 48af8e8
Merge branch 'master' into contract-self-impl
hey-ewan 2a13667
Merge branch 'master' into contract-self-impl
hey-ewan 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
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/contract_abi_auto_impl/Forc.lock
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,8 @@ | ||
[[package]] | ||
name = "contract_abi_auto_impl" | ||
source = "member" | ||
dependencies = ["std"] | ||
|
||
[[package]] | ||
name = "std" | ||
source = "path+from-root-8ECB7FD43A4A6D77" |
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/contract_abi_auto_impl/Forc.toml
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,8 @@ | ||
[project] | ||
name = "contract_abi_auto_impl" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
|
||
[dependencies] | ||
std = { path = "../../../../reduced_std_libs/sway-lib-std-assert" } | ||
11 changes: 11 additions & 0 deletions
11
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/contract_abi_auto_impl/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,11 @@ | ||
contract; | ||
|
||
impl Contract { | ||
fn impl_method() -> u64 { 42 } | ||
} | ||
|
||
#[test] | ||
fn tests() { | ||
let caller = abi(_AnonymousAbi_1, CONTRACT_ID); | ||
assert(caller.impl_method() == 42) | ||
} |
1 change: 1 addition & 0 deletions
1
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/contract_abi_auto_impl/test.toml
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 @@ | ||
category = "unit_tests_pass" |
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.