-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: added README for land-sale package
- Loading branch information
1 parent
154fc72
commit 3df6fee
Showing
4 changed files
with
121 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# land-sale | ||
|
||
The land-sale package outlines the process for deploying Land Presale smart | ||
contracts for The Sandbox's metaverse. | ||
|
||
## Architecture | ||
|
||
This package is used to deploy smart contracts for Land sales. The package | ||
contains 2 main contracts: | ||
|
||
| Component | Description | | ||
| ------------------------------------------------------ | ---------------------------------------------------------------------------------- | | ||
| [AuthValidator](contracts/AuthValidator.sol) | contract which verifies that only a trusted wallet can authorize land sale actions | | ||
| [EstateSaleWithAuth](contracts/EstateSaleWithAuth.sol) | contract used to create and manage land sales in the metaverse. | | ||
|
||
- It leverages two key files: | ||
- **bundles.testnet.json**: Specifies optional asset bundles sold with certain | ||
Lands. | ||
- **sectors.testnet.json**: Defines the sectors being deployed. | ||
- Deploy a new Land Presale contract for each sector using the | ||
`EstateSaleWithAuth` template, as shown in the deploy script. | ||
- **No need for new deploy scripts**: Instead of creating a new deploy script | ||
for each sale, the existing script is updated with the new sectors. | ||
- **Set a Deadline**: A deadline must be specified in | ||
`packages/land-sale/data/deadlines.ts`. | ||
- For mainnet deadline will be of six months and for testnet this deadline is | ||
ignored by the script. | ||
|
||
## Getting Started | ||
|
||
### Step 1: Prepare for Deployment | ||
|
||
- **Receive JSON Files**: The Landsale team will provide `bundles.testnet.json` | ||
and `sectors.testnet.json` files. | ||
- **Organize the Files**: Place the JSON files in a new folder within | ||
`data/land-sale` named `LandPreSale_XX`. | ||
- **NOTE**: Here, `XX` is an incremented folder number that does not correspond | ||
to sector numbers. | ||
|
||
### Step 2: Manage Secrets | ||
|
||
- The mainnet secret **must be different** from the testnet secret. The secret | ||
content can be any unique value. | ||
|
||
--- | ||
|
||
## Sample files | ||
|
||
### bundles.test.json : | ||
|
||
``` | ||
{ | ||
"bundleId": [ | ||
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
] | ||
} | ||
``` | ||
|
||
### sectors.testnet.json : | ||
|
||
``` | ||
[ | ||
{ | ||
"sector": 0, | ||
"lands": [ | ||
{ | ||
"coordinateX": xx, | ||
"coordinateY": yy, | ||
"ownerAddress": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", | ||
"bundleId": "" | ||
} | ||
] | ||
} | ||
] | ||
``` | ||
|
||
### deadlines.ts : | ||
|
||
``` | ||
XX: new Date('YYYY-MM-DDT12:00:00.000Z').valueOf() / 1000 | ||
``` | ||
|
||
--- | ||
|
||
## Running the project locally | ||
|
||
Install dependencies with `yarn` | ||
|
||
To execute the deployment, run | ||
|
||
- for fork deployment: | ||
`yarn fork:deploy --network <NETWORK> --tags <TAG> --no-impersonation` | ||
- for live deployment: `yarn live:deploy --network <NETWORK> --tags <TAG>` | ||
- where: `NETWORK` can either be `sepolia`,`amoy`, `mainet`,`base`, | ||
`baseSepolia`,`bscMainnet`, `bscTestnet` etc |
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
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
3df6fee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report