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

fix for sdk >= v50 #1563

Closed
wants to merge 3 commits into from
Closed

fix for sdk >= v50 #1563

wants to merge 3 commits into from

Conversation

pynixwang
Copy link
Contributor

  • remove parsedLogs
  • fix findAttribute
  • fill logs with []

+ remove parsedLogs
+ fix findAttribute
+ fill logs with []
@pynixwang pynixwang mentioned this pull request Feb 28, 2024
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Great stuff, thank you. Let me finish this up since I need the upgrade as well quickly.

return {
contractAddress: contractAddressAttr.value,
logs: parsedLogs,
logs: [],
Copy link
Member

Choose a reason for hiding this comment

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

Nice, let's deperacte this field

const firstLogs = logs.find(() => true);
const out = firstLogs?.events
export function findAttribute(events: readonly Event[], eventType: string, attrKey: string): Attribute {
const out = events
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep this function unchanged since it is public. Instead we can make a new private one in cosmwasm-stargate to do the job we need.

@@ -15,15 +15,15 @@ const rpcUrl = "http://localhost:26659";
const prefix = "wasm";
const faucet = {
mnemonic:
"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone",
address0: "wasm1pkptre7fdkl6gfrzlesjjvhxhlc3r4gm32kke3",
"flat ski gap size ankle rifle congress month nice state follow mechanic produce cube moment boss enlist disorder during logic brother ride erosion member",
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

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 key has balance

docker run --rm \
--mount type=bind,source="$SCRIPT_DIR/template_v50",target=/root \
"$REPOSITORY:$VERSION" \
./setup_wasmd.sh
Copy link
Member

Choose a reason for hiding this comment

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

I think we can use generate_template.sh instead of this new script

@@ -26,7 +26,7 @@ docker run --rm \
--name "$CONTAINER_NAME" \
-p "$TENDERMINT_PORT_HOST":"$TENDERMINT_PORT_GUEST" \
-p "$LCD_API_PORT_HOST":"$LCD_API_PORT_GUEST" \
--mount type=bind,source="$SCRIPT_DIR/template",target=/template \
--mount type=bind,source="$SCRIPT_DIR/template_v50",target=/template \
Copy link
Member

Choose a reason for hiding this comment

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

We can overrise template since we have no way to switch between different wasmd version anyways

@webmaster128
Copy link
Member

I'll follow up on your work in #1564. Thanks again!

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