Skip to content

Commit

Permalink
Remove Comment, Tweak Vote Script
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Sep 12, 2024
1 parent 2928ad4 commit b86d2e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions server/src/models/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -32,8 +31,6 @@ fn is_matching_public_key(delegate: &Option<String>, 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<String>,
Expand Down
14 changes: 6 additions & 8 deletions vote_script/main.ts
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b86d2e2

Please sign in to comment.