Skip to content

Aaron/fix cosmwasm pusher#263

Merged
akawalsky merged 2 commits intomainfrom
aaron/fix-cosmwasm-pusher
Mar 18, 2026
Merged

Aaron/fix cosmwasm pusher#263
akawalsky merged 2 commits intomainfrom
aaron/fix-cosmwasm-pusher

Conversation

@akawalsky
Copy link
Contributor

No description provided.

@akawalsky akawalsky requested a review from harryrackmil March 18, 2026 20:27
chainID string,
chainPrefix string,
) (*StorkContract, error) {
config := sdktypes.GetConfig()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gets treated as a singleton so every time you create a new instance of this contract it was panicking. This is why the pusher that is currently running is constantly restarting. Tested this locally be forcing a new instance to load and it didn't fail after this change.


accMsg := &authtypes.QueryAccountRequest{
Address: s.clientCtx.FromAddress.String(),
Address: senderBech32Acc,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

s.clientCtx.FromAddress wont work anymore now that we're not setting a global config. This works though locally


initialValues, err := p.pullWithTimeout(ctx, encodedAssetIDs)
if err != nil {
p.logger.Error().Err(err).Msg("Failed to pull initial values from contract")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not an error when the assets have never been pushed before, was always reconnecting before first push before.

$(WASMVM_LIB_DEST):
@echo "Installing CosmWasm libraries..."
@curl -L https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/$(WASMVM_LIB_NAME) -o $(WASMVM_LIB_DEST)
@curl -L https://github.com/CosmWasm/wasmvm/releases/download/v3.0.3/$(WASMVM_LIB_NAME) -o $(WASMVM_LIB_DEST)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

necessary to match below go mod dependency updates

@akawalsky akawalsky merged commit 41ceb4f into main Mar 18, 2026
18 checks passed
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.

2 participants