diff --git a/.github/workflows/devnet.yaml b/.github/workflows/devnet.yaml new file mode 100644 index 0000000..09b9bde --- /dev/null +++ b/.github/workflows/devnet.yaml @@ -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 diff --git a/scripts/multiple_wallet.ts b/scripts/multiple_wallet.ts index 6f321bb..dc59a2b 100644 --- a/scripts/multiple_wallet.ts +++ b/scripts/multiple_wallet.ts @@ -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(); @@ -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); diff --git a/src/utils/deploy_account.ts b/src/utils/deploy_account.ts index 2601c4f..5fa6f58 100644 --- a/src/utils/deploy_account.ts +++ b/src/utils/deploy_account.ts @@ -41,7 +41,11 @@ export async function deploySchnorrAccount(wallet?: EmbeddedWallet): Promise { 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; }