chore: update config and commands to deploy to goerli (#195)
* chore: update config and commands to deploy to goerli * feat: bring changes from other deployment branches into this branch. Including sepolia configs. * chore: update ci to copy .env * chore: add goerli api to .env.example. * chore: update on UI readme * feat: apply the requested changes * chore: change verify-contract to verify.js and remove the other file * chore: make the final requested changes on config files and readme. * fix: missed comma * docs: add the "setting contract address and abi" section to the README file in the UI directory --------- Co-authored-by: janison <jsonsivar@gmail.com> Co-authored-by: Camila Sosa Morales <camisosa@fleek.co>
This commit is contained in:
parent
df3e59f8a3
commit
8eb73f1fd9
|
|
@ -1,5 +1,8 @@
|
|||
# The RPC API URL (e.g. https://rpc-mumbai.maticvigil.com https://polygon-mumbai.g.alchemy.com/v2/your-api-key)
|
||||
API_URL=
|
||||
# The RPC API URL (e.g. https://polygon-mainnet.g.alchemy.com/v2/your-api-key)
|
||||
ETH_SEPOLIA_API_URL=
|
||||
POLYGON_API_URL=
|
||||
ETH_MAIN_API_URL=
|
||||
ETH_GOERLI_API_URL=
|
||||
|
||||
# The exported wallet private key (e.g 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80)
|
||||
# You can reach info about how to get a private key from Metamask on https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key
|
||||
|
|
@ -8,6 +11,13 @@ PRIVATE_KEY=
|
|||
# The blocks explorer API (e.g https://mumbai.polygonscan.com/)
|
||||
POLYSCAN_API=https://mumbai.polygonscan.com/
|
||||
|
||||
# The blocks explorer API (e.g https://sepolia.etherscan.io/)
|
||||
ETHERSCAN_API=https://api-sepolia.etherscan.io/
|
||||
|
||||
# Explorer key
|
||||
POLYGONSCAN_KEY=
|
||||
ETHERSCAN_KEY=
|
||||
|
||||
# The address of the deployed contract on the blockchain
|
||||
CONTRACT_ADDRESS=
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,491 @@
|
|||
{
|
||||
"manifestVersion": "3.2",
|
||||
"admin": {
|
||||
"address": "0x07aA73f07CB86608309a25a41bb02455296ED28B",
|
||||
"txHash": "0x1aad0fc81017a4a12ce168c08ef50e97ed9ccd713a209b0fee0bebf894c646b3"
|
||||
},
|
||||
"proxies": [
|
||||
{
|
||||
"address": "0x8795608346Eb475E42e69F1281008AEAa522479D",
|
||||
"txHash": "0x626662cdb0902646dd70d3ef50abb00c12614d8e572b175f2e45a40a73d4954e",
|
||||
"kind": "transparent"
|
||||
}
|
||||
],
|
||||
"impls": {
|
||||
"0d797e2700f6709b90e0002137bd5fafa5a5728f405046d27d3e8bc86468034c": {
|
||||
"address": "0x03fBB4F0D28f27c33b99F1b80aF679F20cb5E159",
|
||||
"txHash": "0x29e5822d8e44151228816dcf989fb50c9940c163f8eb884393acf4391daf6462",
|
||||
"layout": {
|
||||
"solcVersion": "0.8.12",
|
||||
"storage": [
|
||||
{
|
||||
"label": "_initialized",
|
||||
"offset": 0,
|
||||
"slot": "0",
|
||||
"type": "t_uint8",
|
||||
"contract": "Initializable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
|
||||
"retypedFrom": "bool"
|
||||
},
|
||||
{
|
||||
"label": "_initializing",
|
||||
"offset": 1,
|
||||
"slot": "0",
|
||||
"type": "t_bool",
|
||||
"contract": "Initializable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "1",
|
||||
"type": "t_array(t_uint256)50_storage",
|
||||
"contract": "ContextUpgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "51",
|
||||
"type": "t_array(t_uint256)50_storage",
|
||||
"contract": "ERC165Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
|
||||
},
|
||||
{
|
||||
"label": "_name",
|
||||
"offset": 0,
|
||||
"slot": "101",
|
||||
"type": "t_string_storage",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25"
|
||||
},
|
||||
{
|
||||
"label": "_symbol",
|
||||
"offset": 0,
|
||||
"slot": "102",
|
||||
"type": "t_string_storage",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28"
|
||||
},
|
||||
{
|
||||
"label": "_owners",
|
||||
"offset": 0,
|
||||
"slot": "103",
|
||||
"type": "t_mapping(t_uint256,t_address)",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31"
|
||||
},
|
||||
{
|
||||
"label": "_balances",
|
||||
"offset": 0,
|
||||
"slot": "104",
|
||||
"type": "t_mapping(t_address,t_uint256)",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34"
|
||||
},
|
||||
{
|
||||
"label": "_tokenApprovals",
|
||||
"offset": 0,
|
||||
"slot": "105",
|
||||
"type": "t_mapping(t_uint256,t_address)",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37"
|
||||
},
|
||||
{
|
||||
"label": "_operatorApprovals",
|
||||
"offset": 0,
|
||||
"slot": "106",
|
||||
"type": "t_mapping(t_address,t_mapping(t_address,t_bool))",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "107",
|
||||
"type": "t_array(t_uint256)44_storage",
|
||||
"contract": "ERC721Upgradeable",
|
||||
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:514"
|
||||
},
|
||||
{
|
||||
"label": "_collectionRolesCounter",
|
||||
"offset": 0,
|
||||
"slot": "151",
|
||||
"type": "t_mapping(t_enum(CollectionRoles)3958,t_uint256)",
|
||||
"contract": "FleekAccessControl",
|
||||
"src": "contracts/FleekAccessControl.sol:58"
|
||||
},
|
||||
{
|
||||
"label": "_collectionRoles",
|
||||
"offset": 0,
|
||||
"slot": "152",
|
||||
"type": "t_mapping(t_enum(CollectionRoles)3958,t_mapping(t_address,t_bool))",
|
||||
"contract": "FleekAccessControl",
|
||||
"src": "contracts/FleekAccessControl.sol:63"
|
||||
},
|
||||
{
|
||||
"label": "_tokenRolesVersion",
|
||||
"offset": 0,
|
||||
"slot": "153",
|
||||
"type": "t_mapping(t_uint256,t_uint256)",
|
||||
"contract": "FleekAccessControl",
|
||||
"src": "contracts/FleekAccessControl.sol:70"
|
||||
},
|
||||
{
|
||||
"label": "_tokenRoles",
|
||||
"offset": 0,
|
||||
"slot": "154",
|
||||
"type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_enum(TokenRoles)3960,t_mapping(t_address,t_bool))))",
|
||||
"contract": "FleekAccessControl",
|
||||
"src": "contracts/FleekAccessControl.sol:75"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "155",
|
||||
"type": "t_array(t_uint256)49_storage",
|
||||
"contract": "FleekAccessControl",
|
||||
"src": "contracts/FleekAccessControl.sol:178"
|
||||
},
|
||||
{
|
||||
"label": "_paused",
|
||||
"offset": 0,
|
||||
"slot": "204",
|
||||
"type": "t_bool",
|
||||
"contract": "FleekPausable",
|
||||
"src": "contracts/FleekPausable.sol:23"
|
||||
},
|
||||
{
|
||||
"label": "_canPause",
|
||||
"offset": 1,
|
||||
"slot": "204",
|
||||
"type": "t_bool",
|
||||
"contract": "FleekPausable",
|
||||
"src": "contracts/FleekPausable.sol:24"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "205",
|
||||
"type": "t_array(t_uint256)49_storage",
|
||||
"contract": "FleekPausable",
|
||||
"src": "contracts/FleekPausable.sol:133"
|
||||
},
|
||||
{
|
||||
"label": "_billings",
|
||||
"offset": 0,
|
||||
"slot": "254",
|
||||
"type": "t_mapping(t_enum(Billing)4925,t_uint256)",
|
||||
"contract": "FleekBilling",
|
||||
"src": "contracts/FleekBilling.sol:31"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "255",
|
||||
"type": "t_array(t_uint256)49_storage",
|
||||
"contract": "FleekBilling",
|
||||
"src": "contracts/FleekBilling.sol:81"
|
||||
},
|
||||
{
|
||||
"label": "_accessPoints",
|
||||
"offset": 0,
|
||||
"slot": "304",
|
||||
"type": "t_mapping(t_string_memory_ptr,t_struct(AccessPoint)4457_storage)",
|
||||
"contract": "FleekAccessPoints",
|
||||
"src": "contracts/FleekAccessPoints.sol:64"
|
||||
},
|
||||
{
|
||||
"label": "_autoApproval",
|
||||
"offset": 0,
|
||||
"slot": "305",
|
||||
"type": "t_mapping(t_uint256,t_bool)",
|
||||
"contract": "FleekAccessPoints",
|
||||
"src": "contracts/FleekAccessPoints.sol:66"
|
||||
},
|
||||
{
|
||||
"label": "__gap",
|
||||
"offset": 0,
|
||||
"slot": "306",
|
||||
"type": "t_array(t_uint256)49_storage",
|
||||
"contract": "FleekAccessPoints",
|
||||
"src": "contracts/FleekAccessPoints.sol:211"
|
||||
},
|
||||
{
|
||||
"label": "_appIds",
|
||||
"offset": 0,
|
||||
"slot": "355",
|
||||
"type": "t_uint256",
|
||||
"contract": "FleekERC721",
|
||||
"src": "contracts/FleekERC721.sol:51"
|
||||
},
|
||||
{
|
||||
"label": "_apps",
|
||||
"offset": 0,
|
||||
"slot": "356",
|
||||
"type": "t_mapping(t_uint256,t_struct(Token)6538_storage)",
|
||||
"contract": "FleekERC721",
|
||||
"src": "contracts/FleekERC721.sol:52"
|
||||
},
|
||||
{
|
||||
"label": "_tokenVerifier",
|
||||
"offset": 0,
|
||||
"slot": "357",
|
||||
"type": "t_mapping(t_uint256,t_address)",
|
||||
"contract": "FleekERC721",
|
||||
"src": "contracts/FleekERC721.sol:53"
|
||||
}
|
||||
],
|
||||
"types": {
|
||||
"t_address": {
|
||||
"label": "address",
|
||||
"numberOfBytes": "20"
|
||||
},
|
||||
"t_array(t_uint256)44_storage": {
|
||||
"label": "uint256[44]",
|
||||
"numberOfBytes": "1408"
|
||||
},
|
||||
"t_array(t_uint256)49_storage": {
|
||||
"label": "uint256[49]",
|
||||
"numberOfBytes": "1568"
|
||||
},
|
||||
"t_array(t_uint256)50_storage": {
|
||||
"label": "uint256[50]",
|
||||
"numberOfBytes": "1600"
|
||||
},
|
||||
"t_bool": {
|
||||
"label": "bool",
|
||||
"numberOfBytes": "1"
|
||||
},
|
||||
"t_enum(AccessPointCreationStatus)4443": {
|
||||
"label": "enum FleekAccessPoints.AccessPointCreationStatus",
|
||||
"members": [
|
||||
"DRAFT",
|
||||
"APPROVED",
|
||||
"REJECTED",
|
||||
"REMOVED"
|
||||
],
|
||||
"numberOfBytes": "1"
|
||||
},
|
||||
"t_enum(Billing)4925": {
|
||||
"label": "enum FleekBilling.Billing",
|
||||
"members": [
|
||||
"Mint",
|
||||
"AddAccessPoint"
|
||||
],
|
||||
"numberOfBytes": "1"
|
||||
},
|
||||
"t_enum(CollectionRoles)3958": {
|
||||
"label": "enum FleekAccessControl.CollectionRoles",
|
||||
"members": [
|
||||
"Owner",
|
||||
"Verifier"
|
||||
],
|
||||
"numberOfBytes": "1"
|
||||
},
|
||||
"t_enum(TokenRoles)3960": {
|
||||
"label": "enum FleekAccessControl.TokenRoles",
|
||||
"members": [
|
||||
"Controller"
|
||||
],
|
||||
"numberOfBytes": "1"
|
||||
},
|
||||
"t_mapping(t_address,t_bool)": {
|
||||
"label": "mapping(address => bool)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_address,t_mapping(t_address,t_bool))": {
|
||||
"label": "mapping(address => mapping(address => bool))",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_address,t_uint256)": {
|
||||
"label": "mapping(address => uint256)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_enum(Billing)4925,t_uint256)": {
|
||||
"label": "mapping(enum FleekBilling.Billing => uint256)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_enum(CollectionRoles)3958,t_mapping(t_address,t_bool))": {
|
||||
"label": "mapping(enum FleekAccessControl.CollectionRoles => mapping(address => bool))",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_enum(CollectionRoles)3958,t_uint256)": {
|
||||
"label": "mapping(enum FleekAccessControl.CollectionRoles => uint256)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_enum(TokenRoles)3960,t_mapping(t_address,t_bool))": {
|
||||
"label": "mapping(enum FleekAccessControl.TokenRoles => mapping(address => bool))",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_string_memory_ptr,t_struct(AccessPoint)4457_storage)": {
|
||||
"label": "mapping(string => struct FleekAccessPoints.AccessPoint)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_address)": {
|
||||
"label": "mapping(uint256 => address)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_bool)": {
|
||||
"label": "mapping(uint256 => bool)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_mapping(t_enum(TokenRoles)3960,t_mapping(t_address,t_bool)))": {
|
||||
"label": "mapping(uint256 => mapping(enum FleekAccessControl.TokenRoles => mapping(address => bool)))",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_enum(TokenRoles)3960,t_mapping(t_address,t_bool))))": {
|
||||
"label": "mapping(uint256 => mapping(uint256 => mapping(enum FleekAccessControl.TokenRoles => mapping(address => bool))))",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_struct(Build)6518_storage)": {
|
||||
"label": "mapping(uint256 => struct IERCX.Build)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_struct(Token)6538_storage)": {
|
||||
"label": "mapping(uint256 => struct IERCX.Token)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_mapping(t_uint256,t_uint256)": {
|
||||
"label": "mapping(uint256 => uint256)",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_string_memory_ptr": {
|
||||
"label": "string",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_string_storage": {
|
||||
"label": "string",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_struct(AccessPoint)4457_storage": {
|
||||
"label": "struct FleekAccessPoints.AccessPoint",
|
||||
"members": [
|
||||
{
|
||||
"label": "tokenId",
|
||||
"type": "t_uint256",
|
||||
"offset": 0,
|
||||
"slot": "0"
|
||||
},
|
||||
{
|
||||
"label": "score",
|
||||
"type": "t_uint256",
|
||||
"offset": 0,
|
||||
"slot": "1"
|
||||
},
|
||||
{
|
||||
"label": "contentVerified",
|
||||
"type": "t_bool",
|
||||
"offset": 0,
|
||||
"slot": "2"
|
||||
},
|
||||
{
|
||||
"label": "nameVerified",
|
||||
"type": "t_bool",
|
||||
"offset": 1,
|
||||
"slot": "2"
|
||||
},
|
||||
{
|
||||
"label": "owner",
|
||||
"type": "t_address",
|
||||
"offset": 2,
|
||||
"slot": "2"
|
||||
},
|
||||
{
|
||||
"label": "status",
|
||||
"type": "t_enum(AccessPointCreationStatus)4443",
|
||||
"offset": 22,
|
||||
"slot": "2"
|
||||
}
|
||||
],
|
||||
"numberOfBytes": "96"
|
||||
},
|
||||
"t_struct(Build)6518_storage": {
|
||||
"label": "struct IERCX.Build",
|
||||
"members": [
|
||||
{
|
||||
"label": "commitHash",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "0"
|
||||
},
|
||||
{
|
||||
"label": "gitRepository",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "1"
|
||||
}
|
||||
],
|
||||
"numberOfBytes": "64"
|
||||
},
|
||||
"t_struct(Token)6538_storage": {
|
||||
"label": "struct IERCX.Token",
|
||||
"members": [
|
||||
{
|
||||
"label": "name",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "0"
|
||||
},
|
||||
{
|
||||
"label": "description",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "1"
|
||||
},
|
||||
{
|
||||
"label": "externalURL",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "2"
|
||||
},
|
||||
{
|
||||
"label": "ENS",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "3"
|
||||
},
|
||||
{
|
||||
"label": "logo",
|
||||
"type": "t_string_storage",
|
||||
"offset": 0,
|
||||
"slot": "4"
|
||||
},
|
||||
{
|
||||
"label": "color",
|
||||
"type": "t_uint24",
|
||||
"offset": 0,
|
||||
"slot": "5"
|
||||
},
|
||||
{
|
||||
"label": "currentBuild",
|
||||
"type": "t_uint256",
|
||||
"offset": 0,
|
||||
"slot": "6"
|
||||
},
|
||||
{
|
||||
"label": "builds",
|
||||
"type": "t_mapping(t_uint256,t_struct(Build)6518_storage)",
|
||||
"offset": 0,
|
||||
"slot": "7"
|
||||
}
|
||||
],
|
||||
"numberOfBytes": "256"
|
||||
},
|
||||
"t_uint24": {
|
||||
"label": "uint24",
|
||||
"numberOfBytes": "3"
|
||||
},
|
||||
"t_uint256": {
|
||||
"label": "uint256",
|
||||
"numberOfBytes": "32"
|
||||
},
|
||||
"t_uint8": {
|
||||
"label": "uint8",
|
||||
"numberOfBytes": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -140,13 +140,17 @@ $ yarn deploy:hardhat
|
|||
|
||||
If the execution is successful, you will see the contract address on your screen.
|
||||
|
||||
### **Polygon Mumbai Testnet**
|
||||
### **Testnet deployments**
|
||||
|
||||
To deploy the contract on the testnet, you have to first export your wallet's private key and update the `.env.example` file at the root directory of this repository.
|
||||
|
||||
The [.env.example](./.env.example) file needs to be renamed to `.env` before continuing. Make sure you are using your private API URL, if you have one.
|
||||
|
||||
After updating the `.env` file, you can run:
|
||||
After updating the `.env` file, you can deploy the contract by following the guides below.
|
||||
|
||||
#### **Polygon Mumbai Testnet**
|
||||
|
||||
Run:
|
||||
|
||||
```
|
||||
$ yarn deploy:mumbai
|
||||
|
|
@ -154,6 +158,26 @@ $ yarn deploy:mumbai
|
|||
|
||||
to deploy the contract on the testnet. Please note that your wallet needs to hold enough Mumbai MATIC for the deployment to be successful. To reach more in-depth information about how to deploy contract checkout [this guide](https://wiki.polygon.technology/docs/develop/alchemy).
|
||||
|
||||
#### **Ethereum Sepolia Testnet**
|
||||
|
||||
Run:
|
||||
|
||||
```
|
||||
$ yarn deploy:sepolia
|
||||
```
|
||||
|
||||
to deploy the contract on the testnet. Please note that your wallet needs to hold enough Sepolia ETH for the deployment to be successful. To reach more in-depth information about how to deploy contract checkout [this guide](https://docs.alchemy.com/docs/how-to-deploy-a-smart-contract-to-the-sepolia-testnet).
|
||||
|
||||
#### **Ethereum Goerli Testnet**
|
||||
|
||||
Run:
|
||||
|
||||
```
|
||||
$ yarn deploy:goerli
|
||||
```
|
||||
|
||||
to deploy the contract on the testnet. Please note that your wallet needs to hold enough Goerli ETH for the deployment to be successful.
|
||||
|
||||
### **Deploy arguments**
|
||||
|
||||
For any of the deploy scripts above you are able to input arguments to change the date sent during the deployment. They are:
|
||||
|
|
@ -189,7 +213,7 @@ to deploy the contract on the testnet. Please note that your wallet needs to hol
|
|||
|
||||
## ▶️ Interaction scripts
|
||||
|
||||
Right away, in the [scripts](./scripts/) folder you are able to see some scripts that will help you to interact with deployed contracts. By default you are able to select `localhost`, `hardhat` or `mumbai` network name predefined on [hardhat.config.ts](./hardhat.config.ts). The scripts will be using the deployment information stored in the [deployments](./deployments/) folder. You should have a nested folder for each of the networks you have deployed it. The scripts needs be run using the Hardhat environment following the pattern:
|
||||
Right away, in the [scripts](./scripts/) folder you are able to see some scripts that will help you to interact with deployed contracts. By default you are able to select `localhost`, `hardhat`, `mumbai`, `sepolia` or `goerli` network name predefined on [hardhat.config.ts](./hardhat.config.ts). The scripts will be using the deployment information stored in the [deployments](./deployments/) folder. You should have a nested folder for each of the networks you have deployed it. The scripts needs be run using the Hardhat environment following the pattern:
|
||||
|
||||
```bash
|
||||
# Replace <script_name> with the selected script
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"FleekERC721": [
|
||||
{
|
||||
"address": "0x8795608346Eb475E42e69F1281008AEAa522479D",
|
||||
"timestamp": "3/17/2023, 3:01:30 PM"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -14,9 +14,13 @@ import deploy from './scripts/deploy';
|
|||
dotenv.config();
|
||||
|
||||
const {
|
||||
API_URL = 'https://polygon-mainnet.alchemyapi.io/v2/your-api-key',
|
||||
PRIVATE_KEY,
|
||||
REPORT_GAS,
|
||||
ETHERSCAN_API_KEY,
|
||||
POLYGON_API_URL,
|
||||
ETH_MAIN_API_URL,
|
||||
ETH_SEPOLIA_API_URL,
|
||||
ETH_GOERLI_API_URL,
|
||||
POLYGONSCAN_KEY,
|
||||
MAINNET_API_KEY,
|
||||
COINMARKETCAP_KEY,
|
||||
|
|
@ -35,10 +39,25 @@ const config: HardhatUserConfig = {
|
|||
: undefined,
|
||||
},
|
||||
mumbai: {
|
||||
url: API_URL,
|
||||
url: POLYGON_API_URL ? POLYGON_API_URL : "",
|
||||
accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [],
|
||||
chainId: 80001,
|
||||
},
|
||||
goerli: {
|
||||
url: ETH_GOERLI_API_URL ? ETH_GOERLI_API_URL : "",
|
||||
accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [],
|
||||
chainId: 5,
|
||||
},
|
||||
sepolia: {
|
||||
url: ETH_SEPOLIA_API_URL ? ETH_SEPOLIA_API_URL : "",
|
||||
accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [],
|
||||
chainId: 11155111,
|
||||
},
|
||||
mainnet: {
|
||||
url: ETH_MAIN_API_URL ? ETH_MAIN_API_URL : "",
|
||||
accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [],
|
||||
chainId: 1,
|
||||
},
|
||||
},
|
||||
gasReporter: {
|
||||
enabled: REPORT_GAS === 'true' || false,
|
||||
|
|
@ -68,15 +87,17 @@ const config: HardhatUserConfig = {
|
|||
timeout: 200000, // 200 seconds max for running tests
|
||||
},
|
||||
etherscan: {
|
||||
apiKey: {
|
||||
polygonMumbai: POLYGONSCAN_KEY,
|
||||
},
|
||||
// apiKey: {
|
||||
// polygonMumbai: POLYGONSCAN_KEY,
|
||||
// },
|
||||
apiKey: ETHERSCAN_API_KEY ? ETHERSCAN_API_KEY : "",
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
// npx hardhat deploy --network mumbai --new-proxy-instance --name "FleekNFAs" --symbol "FLKNFA" --billing "[10000, 20000]"
|
||||
// Use the following command to deploy where the network flag can be replaced with the network you choose:
|
||||
// npx hardhat deploy --network goerli --new-proxy-instance --name "FleekNFAs" --symbol "FLKNFA" --billing "[10000, 20000]"
|
||||
task('deploy', 'Deploy the contracts')
|
||||
.addFlag('newProxyInstance', 'Force to deploy a new proxy instance')
|
||||
.addOptionalParam('name', 'The collection name', 'FleekNFAs', types.string)
|
||||
|
|
|
|||
|
|
@ -11,8 +11,12 @@
|
|||
"node:hardhat": "hardhat node",
|
||||
"deploy:hardhat": "hardhat deploy --network hardhat",
|
||||
"deploy:mumbai": "hardhat deploy --network mumbai",
|
||||
"deploy:sepolia": "hardhat deploy --network sepolia",
|
||||
"deploy:goerli": "hardhat deploy --network goerli",
|
||||
"compile": "hardhat compile",
|
||||
"verify:mumbai": "npx hardhat run ./scripts/verify-polyscan.js --network mumbai"
|
||||
"verify:mumbai": "npx hardhat run ./scripts/verify.js --network mumbai",
|
||||
"verify:goerli": "npx hardhat run ./scripts/verify.js --network goerli",
|
||||
"verify:sepolia": "npx hardhat run ./scripts/verify.js --network sepolia"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// npx hardhat run scripts/mint.js --network mumbai
|
||||
// npx hardhat run scripts/mint.js --network mumbai/sepolia/goerli
|
||||
const { getContract } = require('./util');
|
||||
const { getSVGBase64, getSVGColor } = require('./utils/read-svg');
|
||||
const path = require('path');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// npx hardhat run scripts/tokenURI.js --network mumbai
|
||||
// npx hardhat run scripts/tokenURI.js --network mumbai/sepolia/goerli
|
||||
const { getContract } = require('./util');
|
||||
|
||||
// TODO: make this arguments
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// npx hardhat run scripts/upgrade.js --network mumbai
|
||||
// npx hardhat run scripts/upgrade.js --network mumbai/sepolia/goerli
|
||||
const { getContract } = require('./util');
|
||||
|
||||
// TODO: make this arguments
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
const { ethers } = require('hardhat');
|
||||
const { address } = require('../deployments/mumbai/FleekERC721.json');
|
||||
require('@nomiclabs/hardhat-etherscan');
|
||||
|
||||
const networkName = hre.network.name;
|
||||
const { address } = require(`../deployments/${networkName}/FleekERC721.json`);
|
||||
require('@nomiclabs/hardhat-etherscan');
|
||||
|
||||
async function main() {
|
||||
14
ui/README.md
14
ui/README.md
|
|
@ -12,6 +12,12 @@ You'll need to have [nodejs](https://nodejs.org/en/) and [YARN](https://classic.
|
|||
|
||||
Also, don't forget to check the [Getting started section](https://github.com/fleekxyz/non-fungible-apps/wiki/%F0%9F%93%98-Getting-Started) on the wiki if you didn't do it yet, cause you need to configure your wallet to be able to mint a site.
|
||||
|
||||
### Setting Contract Address and ABI
|
||||
|
||||
The contract address and ABI is set by pointing `ui/src/integrations/ethereum/contracts/FleekERC721.json` to the file from the deployment outputs in the contract sub project.
|
||||
|
||||
This can be a local deployment or a deployment on one of the networks. This maintains consistency between the deployed contracts and the info in the UI configuration.
|
||||
|
||||
### 🖥️ Running
|
||||
|
||||
To run the UI localy follow the steps:
|
||||
|
|
@ -51,7 +57,13 @@ To run the UI localy follow the steps:
|
|||
|
||||
Get them from the project settings on the firebase dashboard. Read [this article](https://support.google.com/firebase/answer/7015592?hl=en#zippy=%2Cin-this-article) to know how to get your porject config
|
||||
|
||||
4. Start the local server running the app:
|
||||
4. To interact with the contract, you need to set the Goerli RPC. Set this variable on the .env file
|
||||
|
||||
```bash
|
||||
VITE_GOERLI_RPC
|
||||
```
|
||||
|
||||
5. Start the local server running the app:
|
||||
|
||||
```bash
|
||||
$ yarn dev
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"version": "0.0.1",
|
||||
"description": "Minimal UI for Fleek Non Fungible Apps",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev:css": "tailwindcss -o ./tailwind.css --watch && yarn dev",
|
||||
|
|
|
|||
|
|
@ -19,4 +19,10 @@ export const env = Object.freeze({
|
|||
twitter: {
|
||||
url: import.meta.env.VITE_TWITTER_URL || '',
|
||||
},
|
||||
sepolia: {
|
||||
rpc: import.meta.env.VITE_SEPOLIA_RPC || '',
|
||||
},
|
||||
goerli: {
|
||||
rpc: import.meta.env.VITE_GOERLI_RPC || '',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -14,8 +14,7 @@ const config = {
|
|||
const alchemy = new Alchemy(config);
|
||||
|
||||
export const Ethereum: Ethereum.Core = {
|
||||
//TODO remove
|
||||
defaultNetwork: 'https://rpc-mumbai.maticvigil.com', // TODO: make it environment variable
|
||||
defaultNetwork: env.goerli.rpc,
|
||||
|
||||
provider: {
|
||||
metamask:
|
||||
|
|
|
|||
|
|
@ -181,7 +181,8 @@ export namespace ArgumentsMaps {
|
|||
string, // string gitRepository
|
||||
string, // string logo
|
||||
number, // uint24 color
|
||||
boolean // bool accessPointAutoApproval
|
||||
boolean, // bool accessPointAutoApproval
|
||||
string //verifier address
|
||||
];
|
||||
|
||||
addAccessPoint: [
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import {
|
|||
getDefaultClient,
|
||||
} from 'connectkit';
|
||||
import { createClient, WagmiConfig } from 'wagmi';
|
||||
import { polygonMumbai } from 'wagmi/chains';
|
||||
import { goerli } from 'wagmi/chains';
|
||||
|
||||
import { env } from '@/constants';
|
||||
|
||||
const alchemyId = env.alchemy.id;
|
||||
const chains = [polygonMumbai];
|
||||
const chains = [goerli];
|
||||
|
||||
const wagmiClient = createClient(
|
||||
getDefaultClient({
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const MintStepper: React.FC = () => {
|
|||
</Stepper.Step>
|
||||
|
||||
<Stepper.Step>
|
||||
<Step header="Review your NFA and mint it on Polygon">
|
||||
<Step header="Review your NFA and mint it on Ethereum">
|
||||
<MintPreview />
|
||||
</Step>
|
||||
</Stepper.Step>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ export const MintFormStep: React.FC = () => {
|
|||
appLogo,
|
||||
parseColorToNumber(logoColor),
|
||||
verifyNFA,
|
||||
'0xdBb04e00D5ec8C9e3aeF811D315Ee7C147c5DBFD', //TODO remove hardcode
|
||||
{ value: billing },
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,11 +55,8 @@ export const MintPreview: React.FC = () => {
|
|||
);
|
||||
|
||||
const error = useMemo(
|
||||
() =>
|
||||
[prepareStatus, writeStatus, transactionStatus].some(
|
||||
(status) => status === 'error'
|
||||
),
|
||||
[prepareStatus, writeStatus, transactionStatus]
|
||||
() => [writeStatus, transactionStatus].some((status) => status === 'error'),
|
||||
[writeStatus, transactionStatus]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue