Skip to content

Commit

Permalink
ToLower()
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-romero committed Dec 10, 2024
1 parent 072a190 commit 893509c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/polycli_wrap-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ polycli wrap-contract bytecode [flags]

## Usage

This command takes the bytecode that we want to be deployed for a new contract, and wraps its into the bytecode that we can use to create the contract.
This command takes the runtime bytecode, the bytecode deployed on-chain, as input and converts it into creation bytecode, the bytecode used to create the contract

```bash
$ polycli wrap-contract 69602a60005260206000f3600052600a6016f3
Expand Down
4 changes: 2 additions & 2 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ func BlockUntilSuccessful(ctx context.Context, c *ethclient.Client, retryable fu
}

func WrapDeployedCode(deployedBytecode string, storageBytecode string) string {
deployedBytecode = strings.TrimPrefix(deployedBytecode, "0x")
storageBytecode = strings.TrimPrefix(storageBytecode, "0x")
deployedBytecode = strings.ToLower(strings.TrimPrefix(deployedBytecode, "0x"))
storageBytecode = strings.ToLower(strings.TrimPrefix(storageBytecode, "0x"))

codeCopySize := len(deployedBytecode) / 2
codeCopyOffset := (len(storageBytecode)/2) + 13 + 8 // 13 for CODECOPY + 8 for RETURN
Expand Down

0 comments on commit 893509c

Please sign in to comment.