Skip to content

Commit

Permalink
fix: evm address conversion address
Browse files Browse the repository at this point in the history
  • Loading branch information
tansawit committed Jul 31, 2024
1 parent c251959 commit e8b7e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions evm/address-conversion/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const converter = require("bech32-converting")

let bech32Address = "init1735qkcsrxa438ezvsnhj4csyrelrdr7a2xkxas";
let bech32Address = "init1pyq6amga29zfsldw8k26kgvl7a0fhf3kftflmr";

const hexAddress = converter('init').toHex(bech32Address)
console.log(hexAddress) // 0xd6c82a78C3c898449A63c85fed7C4c6cDdb20CD5
console.log(hexAddress) // 0x0901aeeD1d5144987DaE3D95AB219ff75e9bA636

bech32Address = converter('init').toBech32(hexAddress)
console.log(bech32Address) // init1735qkcsrxa438ezvsnhj4csyrelrdr7a2xkxas
console.log(bech32Address) // init1pyq6amga29zfsldw8k26kgvl7a0fhf3kftflmr
1 change: 0 additions & 1 deletion lib/initia-evm-contracts
Submodule initia-evm-contracts deleted from 4155f5

0 comments on commit e8b7e6c

Please sign in to comment.