Skip to content

Commit

Permalink
update build file
Browse files Browse the repository at this point in the history
  • Loading branch information
MayowaObisesan committed Jun 22, 2024
1 parent 36ddb5e commit 5709669
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/hardhat/deploy/00_deploy_your_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ const deployYourContract: DeployFunction = async function (hre: HardhatRuntimeEn
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;

await deploy("BatchRegistry", {
from: deployer,
// Contract constructor arguments
args: [deployer],
log: true,
// autoMine: can be passed to the deploy function to make the deployment process faster on local networks by
// automatically mining the contract deployment transaction. There is no effect on live networks.
autoMine: true,
});

// Get the deployed contract to interact with it after deploying.
const batchRegistry = await hre.ethers.getContract<Contract>("BatchRegistry", deployer);
console.log("BatchRegistry deployed to:", await batchRegistry.getAddress());
// await deploy("BatchRegistry", {
// from: deployer,
// // Contract constructor arguments
// args: [deployer],
// log: true,
// // autoMine: can be passed to the deploy function to make the deployment process faster on local networks by
// // automatically mining the contract deployment transaction. There is no effect on live networks.
// autoMine: true,
// });

// // Get the deployed contract to interact with it after deploying.
// const batchRegistry = await hre.ethers.getContract<Contract>("BatchRegistry", deployer);
// console.log("BatchRegistry deployed to:", await batchRegistry.getAddress());

await deploy("Greetings", {
from: deployer,
Expand Down
143 changes: 143 additions & 0 deletions packages/nextjs/contracts/externalContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,149 @@ const externalContracts = {
transferOwnership: "@openzeppelin/contracts/access/Ownable.sol",
},
},
Greetings: {
address: "0x521365831caCE9B65F8636f598396ff95B9aEFD9",
abi: [
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "greetingSetter",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "newGreeting",
type: "string",
},
{
indexed: false,
internalType: "bool",
name: "premium",
type: "bool",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "GreetingChange",
type: "event",
},
{
inputs: [],
name: "greeting",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "premium",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_newGreeting",
type: "string",
},
],
name: "setGreeting",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "totalCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "userGreetingCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
inheritedFunctions: {},
},
},
} as const;

Expand Down

0 comments on commit 5709669

Please sign in to comment.