diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 251c8b3..8ac65cc 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -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; @@ -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();