File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
target_chains/starknet/contracts/src Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Starknet release checks
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - pyth-starknet-contract-v*
7
+ jobs :
8
+ check :
9
+ name : Starknet release checks
10
+ runs-on : ubuntu-latest
11
+ defaults :
12
+ run :
13
+ working-directory : target_chains/starknet/contracts/
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - name : Verify version
17
+ run : |
18
+ version1=$(grep version Scarb.toml | cut -d '"' -f 2)
19
+ version2=${GITHUB_REF_NAME#"pyth-starknet-contract-v"}
20
+ if [ "${version1}" != "${version2}" ]; then
21
+ >&2 echo Version mismatch in Scarb.toml and tag name
22
+ exit 1
23
+ fi
Original file line number Diff line number Diff line change 35
35
run : snforge test
36
36
- name : Test local deployment script
37
37
run : bash -c 'PATH="$PATH:$HOME/.config/.dojo/bin" katana & . ~/.config/.starkli/env && deploy/local_deploy'
38
+ - name : Verify version
39
+ run : |
40
+ version1=$(grep version Scarb.toml | cut -d '"' -f 2)
41
+ version2=$(grep -A1 "fn version" src/pyth.cairo | grep "'" | cut -d "'" -f 2)
42
+ if [ "${version1}" != "${version2}" ]; then
43
+ >&2 echo Version mismatch in Scarb.toml and src/pyth.cairo
44
+ exit 1
45
+ fi
Original file line number Diff line number Diff line change @@ -351,6 +351,10 @@ mod pyth {
351
351
}
352
352
}
353
353
354
+ fn version (self : @ ContractState ) -> felt252 {
355
+ ' 0.1.0'
356
+ }
357
+
354
358
fn pyth_upgradable_magic (self : @ ContractState ) -> u32 {
355
359
0x97a6f304
356
360
}
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ pub trait IPyth<T> {
31
31
) -> Array <PriceFeed >;
32
32
fn get_update_fee (self : @ T , data : ByteArray ) -> u256 ;
33
33
fn execute_governance_instruction (ref self : T , data : ByteArray );
34
+ fn version (self : @ T ) -> felt252 ;
34
35
fn pyth_upgradable_magic (self : @ T ) -> u32 ;
35
36
}
36
37
You can’t perform that action at this time.
0 commit comments