Skip to content
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

Upgrade contracts to v0.3.0 with better tests #45

Merged
merged 9 commits into from
Jun 28, 2023
Merged

Upgrade contracts to v0.3.0 with better tests #45

merged 9 commits into from
Jun 28, 2023

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Jun 27, 2023

Upgrade contracts to v0.3.0
Full IBC enabled end to end test of stake, unstake

@@ -116,6 +127,6 @@

// EndBlock executed after every block. It returns no validator updates.
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {
EndBlocker(ctx, am.k)
EndBlocker(ctx, am.k, am.asyncTaskRspHandler)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call
@alpe alpe marked this pull request as ready for review June 27, 2023 11:17
@alpe alpe changed the title Wip Upgrade contracts to v0.3.0-alpha.1 with better tests Jun 27, 2023
@alpe alpe requested a review from pinosu June 27, 2023 11:19
@ethanfrey
Copy link
Collaborator

Are you really using alpha.1 contracts, not beta.2? It would be good to update the PR name.

It would also be good to have a download script there that also writes version.txt file to the testdata directory

Update to use final 0.3.0 contracts
@alpe alpe changed the title Upgrade contracts to v0.3.0-alpha.1 with better tests Upgrade contracts to v0.3.0 with better tests Jun 28, 2023
resp, err := p.chain.SendMsgs(&wasmtypes.MsgExecuteContract{
Sender: p.chain.SenderAccount.GetAddress().String(),
Contract: contract.String(),
Msg: []byte(payload),
Funds: funds,
})
require.Error(p.t, err, "Response: %v", resp)
// workaround sequence issue until wasmd testchain code is updated
p.chain.NextBlock()
require.NoError(p.t, p.chain.SenderAccount.SetSequence(p.chain.SenderAccount.GetSequence()+1))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, very cool

assert.Equal(t, 50_000_000, providerCli.QueryVaultFreeBalance())

// provider chain
// ==============
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

externalStaking sdk.AccAddress
}

func (p *TestProviderClient) BootstrapContracts(connId, portID string) ProviderContracts {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice 👍

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alpe alpe merged commit 5c64d21 into main Jun 28, 2023
@alpe alpe deleted the wip branch June 28, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants