Skip to content

Commit

Permalink
renaming to align with x/wasm naming (#4091)
Browse files Browse the repository at this point in the history
* renaming to align with x/wasm naming

* fix typo

* Update docs/architecture/adr-027-ibc-wasm.md

Co-authored-by: Damian Nolan <[email protected]>

* address review comments

* review comment

---------

Co-authored-by: Damian Nolan <[email protected]>
  • Loading branch information
crodriguezvega and damiannolan authored Jul 20, 2023
1 parent 731dbbf commit 59ccad5
Show file tree
Hide file tree
Showing 39 changed files with 720 additions and 525 deletions.
8 changes: 4 additions & 4 deletions docs/architecture/adr-027-ibc-wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ func (k Keeper) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*type
return nil, sdkerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority: expected %s, got %s", k.authority, msg.Signer)
}

codeID, err := k.storeWasmCode(ctx, msg.Code)
codeHash, err := k.storeWasmCode(ctx, msg.Code)
if err != nil {
return nil, sdkerrors.Wrap(err, "storing wasm code failed")
}

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
clienttypes.EventTypeStoreWasmCode,
sdk.NewAttribute(clienttypes.AttributeKeyWasmCodeID, hex.EncodeToString(codeID)),
sdk.NewAttribute(clienttypes.AttributeKeyWasmCodeHash, hex.EncodeToString(codeHash)),
),
sdk.NewEvent(
sdk.EventTypeMessage,
Expand All @@ -93,12 +93,12 @@ func (k Keeper) StoreCode(goCtx context.Context, msg *types.MsgStoreCode) (*type
})

return &types.MsgStoreCodeResponse{
CodeId: codeID,
CodeHash: codeHash,
}, nil
}
```

The contract's bytecode is stored in state in an entry indexed by the code ID: `codeId/{code ID}`. The code ID is simply
The contract's bytecode is stored in state in an entry indexed by the code hash: `codeHash/{code hash}`. The code hash is simply
the hash of the bytecode of the contract.

### How light client proxy works?
Expand Down
Loading

0 comments on commit 59ccad5

Please sign in to comment.