near/devnet: added devnet words

This commit is contained in:
Josh Siegel 2022-09-13 11:17:04 -05:00 committed by jumpsiegel
parent ae0da5654e
commit 3e8074b5f6
1 changed files with 13 additions and 0 deletions

View File

@ -5,6 +5,7 @@ const BN = require("bn.js");
const fs = require("fs");
const fetch = require("node-fetch");
import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport";
const { parseSeedPhrase, generateSeedPhrase } = require("near-seed-phrase");
function getConfig(env: any) {
switch (env) {
@ -74,6 +75,18 @@ async function initNear() {
JSON.stringify(await masterAccount.getAccountBalance())
);
if (e === "sandbox") {
let da = parseSeedPhrase("weather opinion slam purpose access artefact word orbit matter rice poem badge");
console.log(da);
let resp = await masterAccount.createAccount(
"devnet.test.near",
da.publicKey,
new BN(10).pow(new BN(25))
);
console.log("devnet.test.near funded");
}
const wormholeContract = await fs.readFileSync("./near_wormhole.wasm");
const tokenContract = await fs.readFileSync("./near_token_bridge.wasm");
const nftContract = await fs.readFileSync("./near_nft_bridge.wasm");