Skip to content
Open
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
26 changes: 26 additions & 0 deletions deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const {
createDefaultTxMiddleware,
createInMemorySignerMiddleware,
createLocalAccount,
Client,
Crypto,
} = require("@arcblock/forge-sdk");

const { fromRandom } = Crypto;

const client = new Client({
// Replace with the URL of your Goerli testnet node
chainHost: "https://test.goerli.node.arcblockio.com/api",
chainId: "goerli",
txMiddleware: createDefaultTxMiddleware(),
signer: createInMemorySignerMiddleware(fromRandom()),
});

// Replace with the path to your compiled contracts
const contractPath = "./contracts/src/core/modules"; // path/to/compiled/contracts

// Deploy the contracts to the Goerli testnet
client.deployContract(contractPath).then(({ address }) => {
console.log(`Contract deployed at address: ${address}`);
});