diff --git a/server/src/models/ledger.rs b/server/src/models/ledger.rs index 5afb047a..3b56b0a6 100644 --- a/server/src/models/ledger.rs +++ b/server/src/models/ledger.rs @@ -3,7 +3,6 @@ use std::io::Read; use std::path::Path; use anyhow::anyhow; -use anyhow::Context; use rust_decimal::Decimal; use serde::{Deserialize, Serialize}; @@ -32,8 +31,6 @@ fn is_matching_public_key(delegate: &Option, pk: &String) -> bool { } } -// let url = "https://673156464838-mina-staking-ledgers.s3.us-west-2.amazonaws.com/mainnet/mainnet-74-jxvumaCvujr7UzW1qCB87YR2RWu8CqvkwrCmHY8kkwpvN4WbTJn.json.tar.gz"; - impl Ledger { pub(crate) async fn fetch( hash: impl Into, diff --git a/vote_script/main.ts b/vote_script/main.ts index 078161c0..e909e015 100644 --- a/vote_script/main.ts +++ b/vote_script/main.ts @@ -1,4 +1,4 @@ -import { PrivateKey, Mina, AccountUpdate } from "o1js"; +import { PrivateKey, Mina, AccountUpdate, Provable } from "o1js"; let [, , network, vote, skRaw, feeRaw] = process.argv; if ( @@ -64,14 +64,12 @@ Mina.setActiveInstance( ); try { - await Mina.transaction({ fee, memo: vote, sender: pk }, async function () { + let tx = Mina.transaction({ fee, memo: vote, sender: pk }, async function () { const au = AccountUpdate.create(pk); - au.send({ to: pk, amount: 1e9 }); - }) - .sign([sk]) - .prove() - .send() - .wait(); + au.send({ to: pk, amount: 1_000_000_000 }); + }); + Provable.log(await tx); + await tx.sign([sk]).prove().send().wait(); } catch (e) { if (e instanceof Error) console.error(e.message); throw e;