-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test test * delet files * rainbowkit wagmi adminRouter --------- Co-authored-by: Volkan Güneri <[email protected]> Co-authored-by: root <root@DESKTOP-IA0TRAI>
- Loading branch information
1 parent
14f395a
commit 66e7737
Showing
33 changed files
with
20,878 additions
and
22,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.vscode | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
node_modules | ||
.env | ||
|
||
# Hardhat files | ||
/cache | ||
/artifacts | ||
|
||
# TypeChain files | ||
/typechain | ||
/typechain-types | ||
|
||
# solidity-coverage files | ||
/coverage | ||
/coverage.json | ||
|
||
node_modules | ||
.env | ||
|
||
# Hardhat files | ||
/cache | ||
/artifacts | ||
|
||
# TypeChain files | ||
/typechain | ||
/typechain-types | ||
|
||
# solidity-coverage files | ||
/coverage | ||
/coverage.json | ||
|
||
.yarn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nodeLinker: node-modules | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
#!/bin/bash | ||
|
||
while true | ||
do | ||
echo "Welcome to the deployment menu" | ||
echo "Please select an option:" | ||
|
||
PS3='Choose a deployment option: ' | ||
options=("Tests" "Deploy Local" "Deploy Harmonie Testnet" "Quit") | ||
select opt in "${options[@]}" | ||
do | ||
case $opt in | ||
"Tests") | ||
echo "Testing the contracts on localhost network" | ||
REPORT_GAS=true npx hardhat coverage | ||
break | ||
;; | ||
"Deploy Local") | ||
echo "Deploying contracts on localhost network" | ||
npx hardhat run scripts/deploy.js --network localhost | ||
break | ||
;; | ||
"Deploy Harmonie Testnet") | ||
echo "Deploying factory on localhost network" | ||
npx hardhat run scripts/deploy.js --network localhost | ||
break | ||
;; | ||
"Quit") | ||
echo "Exiting..." | ||
exit 0 | ||
;; | ||
*) echo "Invalid option $REPLY";; | ||
esac | ||
done | ||
done | ||
#!/bin/bash | ||
|
||
while true | ||
do | ||
echo "Welcome to the deployment menu" | ||
echo "Please select an option:" | ||
|
||
PS3='Choose a deployment option: ' | ||
options=("Tests" "Deploy Local" "Deploy Harmonie Testnet" "Quit") | ||
select opt in "${options[@]}" | ||
do | ||
case $opt in | ||
"Tests") | ||
echo "Testing the contracts on localhost network" | ||
REPORT_GAS=true npx hardhat coverage | ||
break | ||
;; | ||
"Deploy Local") | ||
echo "Deploying contracts on localhost network" | ||
npx hardhat run scripts/deploy.js --network localhost | ||
break | ||
;; | ||
"Deploy Harmonie Testnet") | ||
echo "Deploying factory on localhost network" | ||
npx hardhat run scripts/deploy.js --network localhost | ||
break | ||
;; | ||
"Quit") | ||
echo "Exiting..." | ||
exit 0 | ||
;; | ||
*) echo "Invalid option $REPLY";; | ||
esac | ||
done | ||
done |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
require("@nomicfoundation/hardhat-toolbox"); | ||
require('dotenv').config(); | ||
|
||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
module.exports = { | ||
solidity: "0.8.24", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200 | ||
} | ||
}, | ||
defaultNetwork: "hardhat", | ||
networks: { | ||
localhost: { | ||
url: "http://127.0.0.1:8545", | ||
//accounts : from hardhat | ||
chainId: 31337, | ||
gas: 5000000, | ||
}, | ||
// mumbai: { | ||
// url: `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}`, | ||
// accounts: [`0x${PRIVATE_KEY}`], | ||
// chainId: 80001, | ||
// from: `${DEFAULT_ADDRESS_MUMBAI}` | ||
// } | ||
// , | ||
// goerli: { | ||
// url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`, | ||
// accounts: [`${PRIVATE_KEY}`], | ||
// from: `${DEFAULT_ADDRESS_GOERLI}` | ||
|
||
// }, | ||
}, | ||
}; | ||
require("@nomicfoundation/hardhat-toolbox"); | ||
require("dotenv").config(); | ||
|
||
// import("hardhat/config").HardhatUserConfig; | ||
|
||
module.exports = { | ||
solidity: "0.8.24", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200, | ||
}, | ||
}, | ||
defaultNetwork: "hardhat", | ||
networks: { | ||
localhost: { | ||
url: "http://127.0.0.1:8545", | ||
chainId: 31337, | ||
gas: 5000000, | ||
}, | ||
|
||
// mumbai: { | ||
// url: `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}`, | ||
// accounts: [`0x${PRIVATE_KEY}`], | ||
// chainId: 80001, | ||
// from: `${DEFAULT_ADDRESS_MUMBAI}` | ||
// } | ||
// , | ||
// goerli: { | ||
// url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`, | ||
// accounts: [`${PRIVATE_KEY}`], | ||
// from: `${DEFAULT_ADDRESS_GOERLI}` | ||
|
||
// }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
{ | ||
"name": "backend", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0", | ||
"@nomicfoundation/hardhat-ethers": "^3.0.0", | ||
"@nomicfoundation/hardhat-ignition": "^0.15.0", | ||
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", | ||
"@nomicfoundation/hardhat-network-helpers": "^1.0.0", | ||
"@nomicfoundation/hardhat-toolbox": "^5.0.0", | ||
"@nomicfoundation/hardhat-verify": "^2.0.0", | ||
"@typechain/ethers-v6": "^0.5.0", | ||
"@typechain/hardhat": "^9.0.0", | ||
"chai": "^4.2.0", | ||
"ethers": "^6.4.0", | ||
"hardhat": "^2.22.2", | ||
"hardhat-gas-reporter": "^1.0.8", | ||
"solidity-coverage": "^0.8.0", | ||
"typechain": "^8.3.0" | ||
}, | ||
"dependencies": { | ||
"@openzeppelin/contracts": "^5.0.2", | ||
"dotenv": "^16.4.5" | ||
} | ||
} | ||
{ | ||
"name": "backend", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0", | ||
"@nomicfoundation/hardhat-ethers": "^3.0.0", | ||
"@nomicfoundation/hardhat-ignition": "^0.15.0", | ||
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", | ||
"@nomicfoundation/hardhat-network-helpers": "^1.0.0", | ||
"@nomicfoundation/hardhat-toolbox": "^5.0.0", | ||
"@nomicfoundation/hardhat-verify": "^2.0.0", | ||
"@typechain/ethers-v6": "^0.5.0", | ||
"@typechain/hardhat": "^9.0.0", | ||
"chai": "^4.2.0", | ||
"ethers": "^6.11.1", | ||
"hardhat": "^2.22.2", | ||
"hardhat-gas-reporter": "^1.0.8", | ||
"solidity-coverage": "^0.8.0", | ||
"typechain": "^8.3.0" | ||
}, | ||
"dependencies": { | ||
"@openzeppelin/contracts": "^5.0.2", | ||
"dotenv": "^16.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
const hre = require("hardhat"); | ||
const fs = require("fs"); | ||
|
||
async function main() { | ||
|
||
const { chainId } = await ethers.provider.getNetwork(); | ||
let paymentAddress; | ||
/*********************************************************/ | ||
|
||
const Admins = await hre.ethers.getContractFactory("Admins"); | ||
const admins = await Admins.deploy(); | ||
await admins.deployed(); | ||
console.log( | ||
`Admins deployed to ${admins.address}` | ||
); | ||
|
||
|
||
const data1 = { | ||
address: admins.address, | ||
abi: JSON.parse(admins.interface.format('json')) | ||
} | ||
// fs.writeFileSync('./../front/public/contracts/solarNft.json', | ||
// JSON.stringify(data1)) | ||
// fs.writeFileSync(`./../front/public/contracts/${chainId}/solarNft.json`, | ||
// JSON.stringify(data1)) | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
const hre = require("hardhat"); | ||
const ethers = require("ethers"); | ||
// const fs = require("fs"); | ||
|
||
async function main() { | ||
// const { chainId } = await ethers.provider.getNetwork(); | ||
|
||
const Admins = await hre.ethers.getContractFactory("Admins"); | ||
const admins = await Admins.deploy(); | ||
await admins.deployed(); | ||
console.log(`Admins deployed to ${admins.address}`); | ||
|
||
const data1 = { | ||
address: admins.address, | ||
abi: JSON.parse(admins.interface.format("json")), | ||
}; | ||
// fs.writeFileSync('./../front/public/contracts/solarNft.json', JSON.stringify(data1)) | ||
// fs.writeFileSync(`./../front/public/contracts/${chainId}/solarNft.json`, JSON.stringify(data1)) | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); | ||
|
||
// async function main() { | ||
// const [deployer] = await ethers.getSigners(); | ||
|
||
// console.log("Deploying contracts with the account:", deployer.address); | ||
|
||
// const Admins = await hre.ethers.getContractFactory("Admins"); | ||
// const admins = await Admins.deploy(); | ||
// // await admins.deployed(); | ||
// console.log(`Admins deployed to ${admins.address}`); | ||
// } | ||
|
||
// main() | ||
// .then(() => process.exit(0)) | ||
// .catch((error) => { | ||
// console.error(error); | ||
// process.exit(1); | ||
// }); |
Oops, something went wrong.