Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eltontay committed Oct 6, 2022
2 parents 6f23598 + 3039866 commit f9c3bf2
Show file tree
Hide file tree
Showing 10 changed files with 2,542 additions and 28 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,21 @@ https://goerli.etherscan.io/token/0x52e18abefb44e0ceb543ecb0935d5c42c6b2f233

#### Listing of FNFT on Secondary Market

- When listing of FNFT on the secondary market, the owner's FNFT will be transfered to the FNFT contract to act as an escrow.
- Before listing FNFT on the secondary market, the owner has to first `approve()` to the FNFT contract to transact the FNFT on the owner's behalf using `setListing()`
- The owner can list the selling price to no more than 110% of the previous price.
- Depending on the commission amount set by the organiser, the FNFT's owner will receive back the selling price less the commission, upon successful sale of the FNFT.

#### Adjusting listing of FNFT on Secondary Market

- The owner can adjust the selling price of the listed FNFT.
- The owner can adjust the selling price of the listed FNFT with `adjustListing()`

#### Remove listing of FNFT on Secondary Market
#### Removing listing of FNFT on Secondary Market

- When removing of FNFT from the secondary market, the owner's FNFT will be transfered back from the FNFT contract to the owner.
- The owner can remove listed FNFT with `removeListing()`

#### Purchase of FNFT on the Secondary Market

- When the customer wants to buy a FNFT on the secondary marketplace, the FNFT contract will first `approve()` the customer before the customer is
- A customer can purchase a FNFT using `purchaseListing()`

### Explanation through HardHat Testing

Expand All @@ -99,6 +100,15 @@ In your Settlemint Smart Contract Terminal run the following commands :
npm run test
```

## Deployment

Before Deployment, ensure that you have set up a private key in Settlemint.
In your Settlemint Smart Contract Terminal run the following command :

```bash
npm run smartcontract:deploy
```

## More Information

- [Leverage the Graph Middleware to index on chain data](./docs/graph-middleware.md)
Expand Down
19 changes: 17 additions & 2 deletions deploy/00_deploy_example.ts → deploy/FestivalDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,26 @@ const migrate: DeployFunction = async ({ getNamedAccounts, deployments: { deploy
process.exit(1);
}

await deploy('Example', {
const festivalToken = await deploy('FestivalToken', {
from: deployer,
args: [],
args: [
'FestivalToken',
'FTK'
],
log: true,
});

await deploy('FestivalNFT', {
from: deployer,
args: [
'FestivalNFT',
'FNFT',
'https://gateway-festivalstorage-eafc.settlemint.com/ipfs/QmUczjxs9UYvSjufENGV9qzw17Spo3o4EVFDQKSm3U9b1C?filename=SETTLEMINT_TEST.jpg',
festivalToken.address
],
log: true,
});

let hasEtherScanInstance = false;
try {
await run('verify:get-etherscan-endpoint');
Expand Down
1 change: 1 addition & 0 deletions deployments/festival-2ff2/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
3 changes: 3 additions & 0 deletions deployments/festival-2ff2/.migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"00_deploy_example": 1663662909
}
Loading

0 comments on commit f9c3bf2

Please sign in to comment.