Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/ns #1

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
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
23 changes: 23 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Deployer and owner
PRIVATE_KEY=

# Hardhat config
SCAN_API_KEY=
SCAN_API_KEY_MATIC=
SCAN_API_KEY_BSC=
RPC_NODE_URL_RINKEBY=https://rinkeby.infura.io/v3/7e8450f38dce45ec88ecff6d8bb99d4e
RPC_NODE_URL_MAINNET=
RPC_NODE_URL_BSCTESTNET=https://data-seed-prebsc-1-s1.binance.org:8545/
RPC_NODE_URL_GOERLI=https://goerli.infura.io/v3/7e8450f38dce45ec88ecff6d8bb99d4e
RPC_NODE_URL_MUMBAI=https://polygon-mumbai.infura.io/v3/7fbc200d29094660a..

# Test variables
WALLET=0x9e6a2A5Ac4D55eE0952aC3c09e6144353DD3d8DE
SIGNER=0x9e6a2A5Ac4D55eE0952aC3c09e6144353DD3d8DE
SPENDER=0xC480B32B4f6354B1479524114d6b284B57D81117
RECEIVER=0xC480B32B4f6354B1479524114d6b284B57D81117
MANAGER=0xC480B32B4f6354B1479524114d6b284B57D81117
NFT_URI=https://gateway.pinata.cloud/ipfs/QmPhNgR9i4PFtwhaXtf..
TOKEN_NAME=TEST
TOKEN_SYMBOL=TSK
VERIFYING_CONTRACT=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build/contracts
console.txt
secrets.json
contracts/backup
.env
networks

#Hardhat files
cache
Expand Down
2 changes: 1 addition & 1 deletion contracts/MockNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ using Strings for uint256;
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(abi.encode(PERMIT_ALL_TYPEHASH, operator, noncesForAll[signer][operator]++, deadline))
keccak256(abi.encode(PERMIT_ALL_TYPEHASH, signer, operator, noncesForAll[signer][operator]++, deadline))
)
);

Expand Down
22 changes: 14 additions & 8 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require('hardhat-contract-sizer');

const { alchemyApiKeyRinkeby, alchemyApiKeyMain, privkey, etherScanApiKey } = require('./secrets.json');
require("dotenv").config();
require("hardhat-deploy");

const {alchemyApiKeyMain} = require('./secrets.json');

module.exports = {
solidity: "0.8.11",
networks: {
rinkeby: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${alchemyApiKeyRinkeby}`,
url: process.env.RPC_NODE_URL_RINKEBY,
gasPrice: 5000000000, //5 gwei
timeout: 3600000,
accounts: [`0x${privkey}`]
accounts: [process.env.PRIVATE_KEY]
},
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${alchemyApiKeyRinkeby}`,
url: process.env.RPC_NODE_URL_GOERLI,
gasPrice: 5000000000, //5 gwei
timeout: 3600000,
accounts: [`0x${privkey}`]
accounts: [process.env.PRIVATE_KEY]
},
localhost: {
gasPrice: 200000000000, //200 gwei
Expand All @@ -31,14 +33,18 @@ module.exports = {
interval: [13000, 16000]
},
},
bsc: {
url: process.env.RPC_NODE_URL_BSCTESTNET,
accounts: [process.env.PRIVATE_KEY]
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKeyMain}`,
gasPrice: 100000000000, //100 gwei
accounts: [`0x${privkey}`]
accounts: [process.env.PRIVATE_KEY]
}
},
etherscan: {
apiKey: `${etherScanApiKey}`
apiKey: process.env.SCAN_API_KEY_BSC
},
contractSizer: {
alphaSort: true,
Expand Down
Loading