Skip to content

Commit 0bdaeac

Browse files
committed
chore: show bs58 hash as well
1 parent 58fc395 commit 0bdaeac

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

migration/verification/get-staged-code-hash.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { connect, keyStores } from "near-api-js";
22
import dotenv from "dotenv";
33
import chalk from "chalk";
44
import { Buffer } from "buffer";
5+
import bs58 from "bs58";
56

67
dotenv.config();
78

@@ -38,6 +39,9 @@ async function get_staged_code_hash(config: NearConfig): Promise<void> {
3839
const base64Encoded = buffer.toString("base64");
3940

4041
console.log("Base64:", base64Encoded);
42+
43+
const base58Encoded = bs58.encode(buffer);
44+
console.log("Base58:", base58Encoded);
4145
} catch (e) {
4246
console.log(
4347
chalk.yellow(

migration/verification/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"typescript": "^5.8.2"
1919
},
2020
"dependencies": {
21+
"bs58": "^6.0.0",
2122
"chalk": "^5.4.1",
2223
"dotenv": "^16.4.7",
2324
"ethers": "^6.13.5",

migration/verification/pnpm-lock.yaml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

migration/verification/verify-contract-hash.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)