|
|
há 1 ano atrás | |
|---|---|---|
| .. | ||
| deploy | 0db4090750 chore(target_chains/starknet): add mainnet deployment info (#1770) | há 1 ano atrás |
| src | aaacce758c feat(target_chains/starknet): specify guardian set index in wormhole constructor (#1764) | há 1 ano atrás |
| tests | 5e944374a0 fix(target_chains/starknet): fix ByteBuffer conversion for len=31*N case (#1769) | há 1 ano atrás |
| .gitignore | 6e62328528 test(target_chains/starknet): add wormhole contract tests | há 1 ano atrás |
| .tool-versions | b30604c5ba doc(target_chains/starknet): add local deployment script | há 1 ano atrás |
| README.md | 75e6eb125d feat(target_chains/starknet): generate env file from deploy script (#1736) | há 1 ano atrás |
| Scarb.lock | 4e630edac0 feat(target_chains/starknet): fee collection (#1527) | há 1 ano atrás |
| Scarb.toml | 35c23b4488 feat(target_chains/starknet): add reexports and utils (#1652) | há 1 ano atrás |
This directory contains the Pyth contract on Starknet.
The .tool-versions file in this directory specifies the tool versions used by the contract.
Run snforge test in this directory to run the contract unit tests and integration tests.
The tests/data.cairo file contains input data that was generated with test_vaas tool.
To regenerate it, run the following commands from the repository root (requires Rust installation):
cd target_chains/starknet/tools/test_vaas
cargo run --bin generate_test_data > ../../contracts/tests/data.cairo
Run scarb fmt to automatically format the source code.
Run the deployment script:
deploy/deploy.sh > ~/pyth.env
This generates ~/pyth.env file that should contain the address of the deployed contract, for example:
$ cat ~/pyth.env
PYTH_WORMHOLE_ADDRESS=0x07fa5a689a768982ecb60ed05f39ca8f6efe623dd32ee6f3608662e3452a104c
PYTH_CONTRACT_ADDRESS=0x00f61bf0314a478bfc865c71d33cc53c77d0f994ea4a228ccf888d14435a8821
Apply these variables to your current shell with:
export $(xargs < ~/pyth.env)