File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 21
21
# TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822
22
22
services :
23
23
devnet :
24
- image : ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.1.2-seed0 ' || '' }}
24
+ image : ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.2.0-rc.2 ' || '' }}
25
25
ports :
26
26
- 5050:5050
27
27
Original file line number Diff line number Diff line change @@ -118,12 +118,21 @@ export const getTestAccount = (provider: ProviderInterface) => {
118
118
119
119
export const createBlockForDevnet = async ( ) : Promise < void > => {
120
120
if ( ! ( process . env . IS_DEVNET === 'true' ) ) return ;
121
- await fetch ( new URL ( '/create_block' , process . env . TEST_RPC_URL ) , { method : 'POST' } ) ;
121
+ const response = await fetch ( new URL ( '/create_block' , process . env . TEST_RPC_URL ) , {
122
+ method : 'POST' ,
123
+ headers : { 'Content-Type' : 'application/json' } ,
124
+ body : '{}' ,
125
+ } ) ;
126
+
127
+ if ( ! response . ok ) {
128
+ const errorText = await response . text ( ) ;
129
+ throw new Error ( `DEVNET status ${ response . status } : ${ errorText } ` ) ;
130
+ }
122
131
} ;
123
132
124
133
export async function waitNextBlock ( provider : RpcProvider , delay : number ) {
125
134
const initBlock = await provider . getBlockNumber ( ) ;
126
- createBlockForDevnet ( ) ;
135
+ await createBlockForDevnet ( ) ;
127
136
let isNewBlock : boolean = false ;
128
137
while ( ! isNewBlock ) {
129
138
// eslint-disable-next-line no-await-in-loop
You can’t perform that action at this time.
0 commit comments