Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.
This repository was archived by the owner on May 2, 2022. It is now read-only.

Depicted code hash is not the contract code hash #94

@cmichi

Description

@cmichi

The value which is shown as Code Hash is not actually the code hash, but instead the contract's Wasm bytecode.

This is what the UI shows:
ui

This is how the contract bundle looks:

$ cat target/ink/delegator.contract | jq .                                     
{                                                                                                                                                              
  "metadataVersion": "0.1.0",                                                                                                                                  
  "source": {                                                                                                                                                  
    "hash": "0xfa28de816b7ca333f5258a60b5ee37404174609eb629265cfcf770f0d5c0688a",                                                                              
    "language": "ink! 3.0.0-rc3",                                                                                                                              
    "compiler": "rustc 1.53.0-nightly",                                                                                                                        
    "wasm": "0x0061736d…",
  },
  …
}

So using source.hash instead of source.wasm would be the fix.

(Note: In an ideal world the Canvas UI would compute the hash source.wasm by itself and assert hash(source.wasm) == source.hash.)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions