File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2121 # TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822
2222 services :
2323 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 ' || '' }}
2525 ports :
2626 - 5050:5050
2727
Original file line number Diff line number Diff line change @@ -118,12 +118,21 @@ export const getTestAccount = (provider: ProviderInterface) => {
118118
119119export const createBlockForDevnet = async ( ) : Promise < void > => {
120120 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+ }
122131} ;
123132
124133export async function waitNextBlock ( provider : RpcProvider , delay : number ) {
125134 const initBlock = await provider . getBlockNumber ( ) ;
126- createBlockForDevnet ( ) ;
135+ await createBlockForDevnet ( ) ;
127136 let isNewBlock : boolean = false ;
128137 while ( ! isNewBlock ) {
129138 // eslint-disable-next-line no-await-in-loop
You can’t perform that action at this time.
0 commit comments