-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* More documentation on the upgrade procedure and mainnet init * Add profiling utility for aptos * Reuse contract manager logic to sync guardian sets * Add documentation for sui gas profiling
- Loading branch information
Showing
6 changed files
with
103 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "Profiler" | ||
version = "0.0.1" | ||
upgrade_policy = "compatible" | ||
|
||
[dependencies] | ||
Pyth = { git = "https://github.com/pyth-network/pyth-crosschain.git", addr_subst = { "pyth" = "0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387" }, subdir = "target_chains/aptos/contracts", rev = "main" } | ||
|
||
[addresses] | ||
pyth = "0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387" | ||
deployer = "0xb31e712b26fd295357355f6845e77c888298636609e93bc9b05f0f604049f434" | ||
wormhole = "0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625" |
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,11 @@ | ||
# Gas Profiling Utilities | ||
|
||
You can compile and run a simple script in this package to profile gas consumption on a deployed pyth contract. | ||
Here are the steps: | ||
|
||
1. Run `aptos move compile` to compile the script | ||
2. Run the following to simulate the transaction and create a gas profile: | ||
``` | ||
aptos move run-script --compiled-script-path build/Profiler/bytecode_scripts/main.mv --args hex:<update_data_payload_in_hex> --profile-gas | ||
``` | ||
3. Open the created svg files in the `gas-profiling` folder to inspect gas consumption by each module and function |
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,9 @@ | ||
script { | ||
use pyth::pyth; | ||
|
||
|
||
fun main(src: &signer, payload:vector<u8>) { | ||
let payload:vector<vector<u8>> = vector[payload]; | ||
pyth::update_price_feeds_with_funder(src,payload); | ||
} | ||
} |
49 changes: 7 additions & 42 deletions
49
target_chains/ethereum/contracts/scripts/receiverSubmitGuardianSetUpgrades.js
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