You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The voice does not work on injective. It successfully generates proxy contracts on message execution events but saves the incorrect address to state, so it fails to find the generated proxy contract when attempting to execute. This has to do with the way Injective creates contract addresses.
In one on-chain attempt, the instantiated proxy contract had address inj1mlrq3jpkftn7ad2r2fp4n772s7ekl4w7medmth, but the voice contract saved inj1mlrq3jpkftn7ad2r2fp4n772s7ekl4w744m6dz0632umxrv3dneqgy06fl to the SENDER_TO_PROXY map.
The instantiated contract has the following bech32 data:
They contain the same first 20 bytes, but the voice contract is generating 12 more bytes (32 bytes being the length of contract addresses on standard CosmWasm chains).
The normal instantiate2 implementation uses a SHA-256 hash to produce 32 bytes that get converted into a bech32 contract address. It appears Injective just slices off the first 20, but we need to verify this with the Injective wasm module.
The text was updated successfully, but these errors were encountered:
The voice does not work on injective. It successfully generates proxy contracts on message execution events but saves the incorrect address to state, so it fails to find the generated proxy contract when attempting to execute. This has to do with the way Injective creates contract addresses.
I believe the issue is here:
polytone/contracts/main/voice/src/contract.rs
Lines 109 to 116 in 63cbae8
In one on-chain attempt, the instantiated proxy contract had address
inj1mlrq3jpkftn7ad2r2fp4n772s7ekl4w7medmth
, but the voice contract savedinj1mlrq3jpkftn7ad2r2fp4n772s7ekl4w744m6dz0632umxrv3dneqgy06fl
to theSENDER_TO_PROXY
map.The instantiated contract has the following bech32 data:
while the address saved to the voice's map has the following:
They contain the same first 20 bytes, but the voice contract is generating 12 more bytes (32 bytes being the length of contract addresses on standard CosmWasm chains).
The normal
instantiate2
implementation uses a SHA-256 hash to produce 32 bytes that get converted into a bech32 contract address. It appears Injective just slices off the first 20, but we need to verify this with the Injective wasm module.The text was updated successfully, but these errors were encountered: