Skip to content

Commit

Permalink
feat: Use tevmSetAccount to initialize the account
Browse files Browse the repository at this point in the history
  • Loading branch information
William Cory authored and William Cory committed May 24, 2024
1 parent 6cf495c commit 8079d4a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ async function runApp() {
document.querySelector("#blocknumber")!.innerHTML =
`ForkBlock: ${blockNumber}`;

status.innerHTML = "Updating accounts...";
status.innerHTML = "Setting account...";
const setAccountResult = await memoryClient.tevmSetAccount({
address,
balance: 420n,
throwOnFail: false,
});
if (setAccountResult.errors) console.error(setAccountResult.errors);

status.innerHTML = "Updating account...";
await updateAccounts();

status.innerHTML = "Done";
status.innerHTML = "done";
}

runApp();

0 comments on commit 8079d4a

Please sign in to comment.