🔨」 fix: should be good to go

This commit is contained in:
2025-08-27 17:41:55 +02:00
parent 0c82c6441f
commit 5ff0fe7bac
4 changed files with 33 additions and 38 deletions

View File

@ -3,14 +3,14 @@ import { readFile } from "fs/promises";
export const rpc_url = process.env.AVAX_RPC_URL;
export const contract_addr = process.env.AVAX_CONTRACT_ADDR;
export const owner_priv_key = process.env.AVAX_PRIVATE_KEY;
export const owner_priv_key = process.env.AVAX_PRIVATE_KEY || "0x00000000000000000000000000000000000000000000";
const provider = new ethers.JsonRpcProvider(rpc_url);
const wallet = new ethers.Wallet(owner_priv_key, provider);
async function loadContract() {
try {
const wallet = new ethers.Wallet(owner_priv_key, provider);
const contractABI = JSON.parse(await readFile(new URL('../contract/scoreStore.json', import.meta.url)));
const contract = new ethers.Contract(contract_addr, contractABI, wallet);