Skip to content
Open
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
33 changes: 33 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Validate Contracts

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm install

- name: Compile contracts
run: npm run compile

- name: Run tests
run: npm test
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
10 changes: 4 additions & 6 deletions scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

const hre = require("hardhat");
const fs = require("fs");
require("dotenv").config();

async function main() {
const network = hre.network.name;
const [deployer] = await hre.ethers.getSigners();

if (!deployer) throw new Error("No deployer wallet configured");

const AgentExecutor = await hre.ethers.getContractFactory("AgentExecutor");
const executor = await AgentExecutor.deploy();
await executor.waitForDeployment();
Expand All @@ -17,7 +20,7 @@ async function main() {
network,
contract: "AgentExecutor",
address,
destination: "0xfd1610f5eae31dd757e55d6b4ba543b80a2720b3",
destination: process.env.DESTINATION_ADDRESS || null,
deployer: deployer.address,
deployedAt: new Date().toISOString()
};
Expand All @@ -27,11 +30,6 @@ async function main() {
JSON.stringify(record, null, 2)
);

fs.writeFileSync(
"agent-deployment-base.json",
JSON.stringify(record, null, 2)
);

console.log(record);
}

Expand Down
Loading