-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Parse Logs and LogData from all contracts used (#720)
* setup contracts for test * adjust contract flow * make u8 * update tests * refactor * cs * revise from pr review
- Loading branch information
Cameron Manavian
authored
Jan 11, 2023
1 parent
52e62e4
commit 5a08f80
Showing
13 changed files
with
98 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@fuel-ts/abi-coder": minor | ||
"@fuel-ts/contract": minor | ||
--- | ||
|
||
Adjust contract interface to parse logs from external contracts - breaking change for adding contracts to a call |
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
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
5 changes: 5 additions & 0 deletions
5
packages/fuel-gauge/test-projects/advanced-logging-other-contract-abi/Forc.toml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project] | ||
license = "Apache-2.0" | ||
name = "advanced-logging-other-contract-abi" | ||
|
||
[dependencies] |
6 changes: 6 additions & 0 deletions
6
packages/fuel-gauge/test-projects/advanced-logging-other-contract-abi/src/main.sw
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
library advanced_logging_other_contract_abi; | ||
|
||
abi AdvancedLoggingOtherContract { | ||
fn msg_from_other_contract(a:u8); | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
packages/fuel-gauge/test-projects/advanced-logging-other-contract/Forc.toml
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[project] | ||
license = "Apache-2.0" | ||
name = "advanced-logging-other-contract" | ||
|
||
[dependencies] | ||
advanced-logging-other-contract-abi = { path = "../advanced-logging-other-contract-abi" } |
13 changes: 13 additions & 0 deletions
13
packages/fuel-gauge/test-projects/advanced-logging-other-contract/src/main.sw
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
contract; | ||
|
||
use std::logging::log; | ||
|
||
use advanced_logging_other_contract_abi::AdvancedLoggingOtherContract; | ||
|
||
impl AdvancedLoggingOtherContract for Contract { | ||
fn msg_from_other_contract(a: u8) { | ||
log("Hello from other Contract"); | ||
log("Received value from main Contract:"); | ||
log(a); | ||
} | ||
} |
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