warden-protocol / wardenprotocol

Monorepo for the Warden Protocol.
https://wardenprotocol.org
Apache License 2.0
1.09k stars 96 forks source link

Osmosis analyzer #343

Closed Pitasi closed 1 week ago

Pitasi commented 1 month ago

Like for #266, we can implement a smart contract that takes the binary payload representing an osmosis transactions and returns the "data_for_signing" (i.e. the hash to be signed).

Basically we need to reimplement this logic in Rust: https://github.com/warden-protocol/wardenprotocol/blob/2787d9d988d067dce0fafd6d45615837881b0d7f/warden/x/warden/types/v1beta2/sign_method_handler_osmosis.go#L24-L41.

Pitasi commented 1 month ago

steps:

test case:

expected signature_hash (hex encoded for showing here on github):

858a2e13af1c1d6a89357d2408fa68a6e17fa5a97437c95c44fafae1746bc203
AzraelSec commented 1 month ago

Hello @Pitasi 👋🏻 May I take care of this issue?