-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fossil client callback settles round (#186)
* wip: fossil callback settles round * wip: updating tests * tests: fix tests by adding future round allowance to settle round accelerator * undo gas limit update
- Loading branch information
Showing
15 changed files
with
206 additions
and
199 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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use pitch_lake::fossil_client::interface::{L1Data, JobRequest, FossilResult}; | ||
use pitch_lake::tests::utils::facades::vault_facade::{VaultFacade, VaultFacadeTrait}; | ||
use pitch_lake::tests::utils::helpers::general_helpers::to_gwei; | ||
|
||
fn get_mock_l1_data() -> L1Data { | ||
L1Data { twap: to_gwei(33) / 100, volatility: 1009, reserve_price: to_gwei(11) / 10 } | ||
} | ||
|
||
fn get_mock_result() -> FossilResult { | ||
FossilResult { proof: array![].span(), l1_data: get_mock_l1_data() } | ||
} | ||
|
||
fn get_mock_result_serialized() -> Span<felt252> { | ||
let mut result_serialized = array![]; | ||
get_mock_result().serialize(ref result_serialized); | ||
result_serialized.span() | ||
} | ||
|
||
fn get_request(ref vault: VaultFacade) -> JobRequest { | ||
vault.get_request_to_settle_round() | ||
} | ||
|
||
fn get_request_serialized(ref vault: VaultFacade) -> Span<felt252> { | ||
let mut request_serialized = array![]; | ||
get_request(ref vault).serialize(ref request_serialized); | ||
request_serialized.span() | ||
} |
Oops, something went wrong.