-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add CI for integration test suite for contract upgrades #381
base: main
Are you sure you want to change the base?
Conversation
I suggest to put these scripts in a separate |
will look into it |
this is done |
async function getBlockWithHeight(env: any, height: string): Promise<any> { | ||
const BLOCK_BY_HEIGHT_QUERY = `query Block($height: U64) { | ||
block(height: $height) { | ||
id | ||
} | ||
}`; | ||
const BLOCK_BY_HEIGHT_ARGS = { | ||
height: height, | ||
}; | ||
|
||
return fetch(env.fuel.provider.url, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
query: BLOCK_BY_HEIGHT_QUERY, | ||
variables: BLOCK_BY_HEIGHT_ARGS, | ||
}), | ||
}) | ||
.then((res: any) => res.json()) | ||
.then(async (res) => { | ||
if (!res.data.block) { | ||
throw new Error(`Could not fetch block with height ${height}`); | ||
} | ||
|
||
return res.data.block; | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is typeless, why not use fuelsProvider.getBlock(height)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced
solidity-contracts
workspace dependency infungible-token
andmessage-predicates
packages to resolve cyclic dependency