Agent keys are stored in memory, which is completely insecure. We strongly believe that connecting agents to custodial services, such as Fireblocks, is essential for security.
To configure the agent, refer to:
📂 agent/src/_common/config/agent-config
-
Configure Agent 1 and Agent 2 to receive 2FA requests via email:
- Edit the following configuration files:
agent/src/_common/config/agent1-config
agent/src/_common/config/agent2-config
- Modify the notification settings:
notificationTo: { type: "email", value: "[YOUR EMAIL]" }
⚠️ Important: 2FA emails may be sent to your SPAM folder.
- Edit the following configuration files:
-
Setting Up Your Authenticator:
- To get a valid 2FA code when prompted, configure your Google Authenticator (or similar) with the TOTP secret found in:
agent1-config -> totp
agent2-config -> totp
- 🔑 Both agents share the same TOTP secret for this demo.
- To get a valid 2FA code when prompted, configure your Google Authenticator (or similar) with the TOTP secret found in:
cd agent
yarn start:agent1
🕐 Wait until it starts.
Open another terminal and run:
cd agent
yarn start:agent2
✅ Both agents will log:
No proposals found
Open another terminal and navigate to /onchain
:
cd onchain
Run the following command for Base Testnet:
npx hardhat test test/BoxUpgradeability.ts --network base_testnet
📌 Agents will log:
Waiting for a proposal on Sepolia
Then, run the command for Sepolia Testnet:
npx hardhat test test/BoxUpgradeability.ts --network sepolia_testnet
📌 Agents will log:
Upgrade checks passed
📌 Agents will now request 2FA approval.
- Open Postman (or any API client).
- Send the 2FA codes to the corresponding agents.
🔹 Once approved, the agents will:
- Confirm transactions ✅
- Execute the upgrade (Agent 1 handles execution & pays for gas) 🔥
If you want to test a transfer proposal instead of an upgrade:
- Open the test file:
📂/onchain/test/BoxUpgradeability.ts
- Modify the test suite:
- Skip the upgrade test:
it.skip("Propose upgrade with proposer");
- Unskip the transfer test:
it("Propose transfer with proposer");
- Skip the upgrade test:
- Run the demo following the same steps as before.
👉 No balance checks are performed!