You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-6Lines changed: 34 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
# RAIR Smart Contracts
2
2
Source code and deployment scripts for RAIR smart contracts.
3
+
Notice: classic-contracts are deprecated contracts, for deployment you'll need to modify the deployment scripts with your addresses.
3
4
4
5
## Setup
5
6
Environment variables
@@ -10,6 +11,7 @@ Environment variables
10
11
| SEPOLIA_RPC | RPC endpoint for Ethereum Sepolia |
11
12
| AMOY_RPC | RPC endpoint for Matic Amoy |
12
13
| MATIC_RPC | RPC endpoint for Matic Mainnet |
14
+
| BASE_RPC | RPC endpoint for Base Mainnet |
13
15
| ADDRESS_PRIVATE_KEY | Private key of the deployer wallet |
14
16
| COINMARKETCAP_API_KEY | API Key from coinmarketcap for hardhat's gas price estimations (optional) |
15
17
| ETHERSCAN_API_KEY | API key for Etherscan (used for verifying contracts) |
@@ -24,14 +26,40 @@ Inside the deploy directory you'll find the scripts for all of the diamond contr
24
26
| Marketplace | Minting and resale offers |
25
27
| Facet Source | Diamond contract from which all ERC721 contracts get their facets |
26
28
27
-
The deployment process is automated, the deployment is done thanks to hardhat-deploy and the verification is done through hardhat-etherscan. All deployed contracts can be found in the "deployments" directory
29
+
The deployment process is automated, it is done thanks to hardhat-deploy and the verification is done through hardhat-verify. All deployed contracts can be found in the "deployments" directory
28
30
29
31
## Testing
30
32
```npm run test``` will start the local testing on an ethereum mainnet fork, the main test script is under the "test" directory
31
33
32
-
### Setup
33
-
* Factory
34
-
* changeToken(<erc20address>, <pricetodeploy>)
34
+
## Setup
35
+
### Connecting the facets
36
+
Once all diamond facets are verified you'll need to connect them with the diamondCut function
37
+
* Necessary for all 3 contracts:
38
+
* DiamondCutFacet
39
+
* DiamondLoupeFacet
40
+
* OwnershipFacet
41
+
* Addresses for Factory
42
+
* CreatorsFacet
43
+
* DeployerFacet
44
+
* TokensFacet
45
+
* PointsDeposit
46
+
* PointsQuery
47
+
* PointsWithdraw
48
+
* Addresses for Marketplace
49
+
* MintingOffersFacet
50
+
* FeesFacet
51
+
* ResaleFacet
52
+
* Addresses for the ERC721 source
53
+
* ERC721EnumerableFacet
54
+
* RAIRMetadataFacet
55
+
* RAIRProductFacet
56
+
* RAIRRangesFacet
57
+
* RAIRRoyaltiesFacet
35
58
36
-
* Marketplace
37
-
* grantRole(RESALE_ADMIN, <signeraddress>)
59
+
### Setup calls
60
+
| Functions | Description |
61
+
| --- | --- |
62
+
| Factory.changeToken(<erc20address>, <pricetodeploy>) | Configure the factory to use tokens from the ERC20 to deploy |
63
+
| Marketplace.updateTreasuryAddress(<treasuryaddress>) | Set the address for the treasury fees |
64
+
| Marketplace.updateTreasuryFee(<value>) | Percentage the treasury will receive on every mint |
65
+
| Marketplace.grantRole(RESALE_ADMIN, <signeraddress>) | Approve an user address to generate resale hashes |
0 commit comments