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

TestExecuteManualInactiveContractFailure does not check whether the contract is active or not #39

Closed
da1suk8 opened this issue Apr 27, 2023 · 0 comments · Fixed by #43
Closed
Assignees

Comments

@da1suk8
Copy link
Member

da1suk8 commented Apr 27, 2023

func TestExecuteManualInactiveContractFailure(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, AvailableCapabilities)
keeper := keepers.ContractKeeper
deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000))
topUp := sdk.NewCoins(sdk.NewInt64Coin("denom", 5000))
creator := keepers.Faucet.NewFundedRandomAccount(ctx, deposit...)
fred := keepers.Faucet.NewFundedRandomAccount(ctx, topUp...)
wasmCode, err := os.ReadFile("./testdata/hackatom.wasm")
require.NoError(t, err)
contractID, _, err := keeper.Create(ctx, creator, wasmCode, nil)
require.NoError(t, err)
_, _, bob := keyPubAddr()
initMsg := HackatomExampleInitMsg{
Verifier: fred,
Beneficiary: bob,
}
initMsgBz, err := json.Marshal(initMsg)
require.NoError(t, err)
addr, _, err := keeper.Instantiate(ctx, contractID, creator, nil, initMsgBz, "demo contract 3", deposit)
require.NoError(t, err)
require.Equal(t, "link14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sgf2vn8", addr.String())
}

@da1suk8 da1suk8 self-assigned this Apr 28, 2023
@da1suk8 da1suk8 mentioned this issue May 2, 2023
5 tasks
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 a pull request may close this issue.

1 participant