Skip to content

Commit

Permalink
use initial accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
critesjosh authored Sep 12, 2024
1 parent 7ba4323 commit 00768d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { AccountWallet, CompleteAddress, ContractDeployer, createDebugLogger, Fr
import { getSchnorrAccount } from '@aztec/accounts/schnorr';
import { AztecAddress, deriveSigningKey } from '@aztec/circuits.js';
import { TokenContract } from "@aztec/noir-contracts.js";
import { getInitialTestAccountsWallets } from "@aztec/accounts/testing";

const setupSandbox = async () => {
const { PXE_URL = 'http://localhost:8080' } = process.env;
Expand All @@ -21,18 +22,20 @@ async function main() {
logger = createDebugLogger('aztec:aztec-starter');

pxe = await setupSandbox();
wallets = await getInitialTestAccountsWallets(pxe);

let secretKey = Fr.random();
let salt = Fr.random();


let schnorrAccount = await getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt);
const { address, publicKeys, partialAddress } = schnorrAccount.getCompleteAddress();
let wallet = await schnorrAccount.register();
let tx = await schnorrAccount.deploy();
let wallet = await schnorrAccount.register();

await EasyPrivateVotingContract.deploy(wallets[0], address).send().deployed()
// let token = await TokenContract.deploy(wallet, wallet.getAddress(), "Test", "TST", 18).send().deployed();

// await token.methods.mint_private(wallet.getAddress(), 100).send().wait();

}

main();

0 comments on commit 00768d4

Please sign in to comment.