Skip to content

Virtualground-Lab/marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Virtualground Marketplace

Link

About

In the Virtualground marketplace, each NFT can be swapped for VGR tokens through a smart contract, allowing for trustless and transparent atomic swaps.

Address

Built With

(back to top)

Terminology

  • Order: NFT listing. Every order has its unique id generated by the block timestamp, NFT owner, id and the price.

  • Asset: NFT token which follows the ERC721 Ethereum standard.

  • Composable Asset: An NFT token which is composed of other NFTs. For example: An estate is a composable NFT.

  • Account: an Ethereum address.

Design

This contract is upgradable, ownable and pausable. It accepts only tokens which follow the ERC721 Ethereum standard for listing and the VGR token for buying.

Specification

Events

OrderCreated Emitted when an asset is listed for sale.

event OrderCreated(
  bytes32 id,
  uint256 indexed assetId,
  address indexed seller,
  address nftAddress,
  uint256 priceInWei,
  uint256 expiresAt
);

OrderCancelled

Emitted when an asset listing was cancelled.

event OrderCancelled(
  bytes32 id,
  uint256 indexed assetId,
  address indexed seller,
  address nftAddress
);

OrderSuccessful

Emitted when an asset was successfully bought.

event OrderSuccessful(
  bytes32 id,
  uint256 indexed assetId,
  address indexed seller,
  address nftAddress,
  uint256 totalPrice,
  address indexed buyer
);

ChangedPublicationFee

Emitted when the fee for listing was changed.

event ChangedPublicationFee(
  uint256 publicationFee
);

ChangedFeesCollectorCutPerMillion

Emitted when

event ChangedFeesCollectorCutPerMillion(
  uint256 feesCollectorCutPerMillion
);

ChangedRoyaltiesCutPerMillion

event ChangedRoyaltiesCutPerMillion(
  uint256 royaltiesCutPerMillion
);

FeesCollectorSet

event FeesCollectorSet(
  address indexed oldFeesCollector,
  address indexed newFeesCollector
);

RoyaltiesManagerSet

event RoyaltiesManagerSet(
  IRoyaltiesManager index oldRoyaltiesManager,
  IRoyaltiesManager index newRoyaltiesManager
);

Functions

[TO BE ADDED...]

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)