Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
update deploy#success
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJonaseb11 committed Oct 26, 2024
1 parent 55fd65f commit e173856
Show file tree
Hide file tree
Showing 10 changed files with 2,564 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat/contracts/DataRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pragma solidity ^0.8.20;
// imports
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";

contract DataRegistry is AccessControl{
contract Registry is AccessControl{
// states for tracking events
uint256 public eventCounter;
mapping(uint256 => EventLog) public events;
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/contracts/Participants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pragma solidity ^0.8.20;
// imports
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";

contract Partcipants is AccessControl{
contract Participants is AccessControl{
// states
mapping(address => Participant) public participants;
address[] public participantList;
Expand Down
47 changes: 47 additions & 0 deletions packages/hardhat/deploy/1_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable prettier/prettier */
"use strict";

const hre = require("hardhat");

const deployFunction = async ({ deployments, getNamedAccounts }) => {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

// Deploy the SupplyChain contract
const supplychain = await deploy("SupplyChain", {
from: deployer,
log: true,
nonce: await ethers.provider.getTransactionCount(deployer)
});
console.log("SupplyChain contract deployed to:", supplychain.address);

// Deploy the Participants contract
const participants = await deploy("Participants", {
from: deployer,
log: true,
nonce: await ethers.provider.getTransactionCount(deployer)
});
console.log("Participants contract deployed to:", participants.address);

// Deploy the Registry contract
const registry = await deploy("Registry", {
from: deployer,
log: true,
nonce: await ethers.provider.getTransactionCount(deployer)
});
console.log("Registry contract deployed to:", registry.address);

// Deploy the MineralToken contract
const mineralToken = await deploy("MineralToken", {
from: deployer,
log: true,
nonce: await ethers.provider.getTransactionCount(deployer)
});
console.log("MineralToken contract deployed to:", mineralToken.address);
};

// Setting individual tags correctly
module.exports = deployFunction;
module.exports.tags = ["SupplyChain", "Participants", "Registry", "MineralToken"];
24 changes: 0 additions & 24 deletions packages/hardhat/deploy/1_deploy_supplychain.js

This file was deleted.

8 changes: 6 additions & 2 deletions packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
/* eslint-disable @typescript-eslint/no-var-requires */
// hardhat.config.cjs
// require("@nomicfoundation/hardhat-toolbox");
Expand Down Expand Up @@ -36,6 +37,9 @@ module.exports = {
optimizer: {
enabled: true,
runs: 200,
}
}
},
},
namedAccounts: {
deployer: 0, // Account index or name in hardhat.config
},
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
"use strict";
const hre = require("hardhat");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */
/* eslint-disable @typescript-eslint/no-var-requires */
"use strict";
const hre = require("hardhat");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable prettier/prettier */
"use strict";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const hre = require("hardhat");

const main = async() => {
Expand Down
7 changes: 3 additions & 4 deletions packages/nextjs/app/(app)/onboarding/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Metadata } from "next";

import { ClaimRoleCard } from "~~/components/dashboard/ClaimRoleCard";
export const metadata: Metadata = {
title: "Welcome abroad!",
};

export default function OnBoadingPage() {
return (
<div className="w-full min-h-screen flex justify-center items-center">
<p>Hello world</p>
<ClaimRoleCard />
</div>
);
}
}
Loading

0 comments on commit e173856

Please sign in to comment.