Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/devnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Devnet Tests

on:
push:
branches:
- next
- dev
pull_request:
branches:
- next
- dev
workflow_dispatch:

jobs:
devnet-deploy-account:
name: Deploy Account to Devnet
runs-on: ubuntu-latest
env:
AZTEC_ENV: devnet
AZTEC_VERSION: 4.0.0-devnet.2-patch.1

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "yarn"

- name: Install project dependencies
run: yarn

- name: Deploy account to devnet
run: yarn deploy-account::devnet
10 changes: 7 additions & 3 deletions scripts/multiple_wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ import { createAztecNodeClient } from "@aztec/aztec.js/node";
import { TokenContract } from "@aztec/noir-contracts.js/Token"
import { getSponsoredFPCInstance } from "../src/utils/sponsored_fpc.js";
import { SponsoredFPCContractArtifact } from "@aztec/noir-contracts.js/SponsoredFPC";
import { getAztecNodeUrl, getTimeouts } from "../config/config.js";
import configManager, { getAztecNodeUrl, getTimeouts } from "../config/config.js";
import { EmbeddedWallet } from "@aztec/wallets/embedded";

const nodeUrl = getAztecNodeUrl();
const node = createAztecNodeClient(nodeUrl);
const walletOpts = {
ephemeral: true,
pxeConfig: { proverEnabled: configManager.isDevnet() },
};

const L2_TOKEN_CONTRACT_SALT = Fr.random();

Expand All @@ -33,8 +37,8 @@ export async function getL2TokenContractInstance(deployerAddress: any, ownerAzte

async function main() {

const wallet1 = await EmbeddedWallet.create(node, { ephemeral: true });
const wallet2 = await EmbeddedWallet.create(node, { ephemeral: true });
const wallet1 = await EmbeddedWallet.create(node, walletOpts);
const wallet2 = await EmbeddedWallet.create(node, walletOpts);
const sponsoredFPC = await getSponsoredFPCInstance();
await wallet1.registerContract(sponsoredFPC, SponsoredFPCContractArtifact);
await wallet2.registerContract(sponsoredFPC, SponsoredFPCContractArtifact);
Expand Down
6 changes: 5 additions & 1 deletion src/utils/deploy_account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export async function deploySchnorrAccount(wallet?: EmbeddedWallet): Promise<Acc
logger.info('✅ Sponsored fee payment method configured for account deployment');

// Deploy account
await deployMethod.send({ from: AztecAddress.ZERO, fee: { paymentMethod: sponsoredPaymentMethod }, wait: { timeout: 120000 } });
await deployMethod.send({
from: AztecAddress.ZERO,
fee: { paymentMethod: sponsoredPaymentMethod },
wait: { timeout: 120 },
});

logger.info(`✅ Account deployment transaction successful!`);

Expand Down
7 changes: 5 additions & 2 deletions src/utils/setup_wallet.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { createAztecNodeClient } from '@aztec/aztec.js/node';
import { getAztecNodeUrl } from '../../config/config.js';
import configManager, { getAztecNodeUrl } from '../../config/config.js';
import { EmbeddedWallet } from '@aztec/wallets/embedded';

export async function setupWallet(): Promise<EmbeddedWallet> {
const nodeUrl = getAztecNodeUrl();
const node = createAztecNodeClient(nodeUrl);
const wallet = await EmbeddedWallet.create(node, { ephemeral: true });
const wallet = await EmbeddedWallet.create(node, {
ephemeral: true,
pxeConfig: { proverEnabled: configManager.isDevnet() },
});
return wallet;
}