Byzantium hard fork...
Constantinople release is due to come...
Istanbul code-coverage testing framework...
Kapalicarsi anyone?
GrandBazaar is an ASP.NET Core MVC project which implements a decentralized marketplace.
-
Visitors (users not logged in the web app) can view all the items listed for selling as well as each item's details. Each item can have one or more images. Visitors are not allowed to purchase items.
-
Visitors can register as customers and purchase items.
-
The
Bazaar
Ethereum smart contract keeps track of all the items that are on sale, their seller address, price and stock amount. When an item is purchased, the payment is sent to the contract which transfers it from the customer's to the seller's account. -
The smart contract retains a configurable percentage of each transaction. This commission is set when the contract is deployed. For instance, setting the commission to 5 (%) means the seller gets 95 % of the transaction amount.
-
-
Sellers register and list items for sale in the Ethereum blockchain.
-
Each item's stock amount, seller address and price are stored in Ethereum (the
Bazaar
contract). -
The other properties, such as name, description, images (Base64-encoded) are stored in the IPFS file system as a JSON document.
-
Sellers can add items by providing a keystore file and a password so that their Ethereum account can be retrieved. This account is used when signing the transaction.
-
Sellers can view only the items that they have created. They have to be logged in MetaMask so that their account address can be sent to the contract. The contract returns only the items for that seller based on the address provided.
-
-
Customers have an account which is used when purchasing items (for signing the transaction). Again a keystore file and a password are required. This way there is no need to store customers' account private keys server-side.
- .NET Core 2.1
- Entity Framework Core Tools 2.0.1
- SQL Server 2014 or above (for user account storage)
- Nethereum.Web3 2.5.1
- Visual Studio Code for contract development (using the Solidity plugin by Juan Franco)
- Remix IDE for smart contract deployment
- Truffle framework for unit testing
- Have Google Go and IPFS installed
- MetaMask and web3.js
- Clone the project locally and open it in Visual Studio (version >= 2017).
- Restore NuGet packages.
- Set
GrandBazaar.WebClient
project as startup project. - In Package Manager Console select
GrandBazaar.WebClient
project from the dropdown above and executeUpdate-Database
. - In a command line start the local IPFS daemon by executing
ipfs daemon
. - Start the project.
-
For ordinary test execution:
- Start
ganache-cli
in the command line. - In Visual Studio Code terminal run
truffle test
.
- Start
-
For code-coverage testing:
- In a command line window go to
GrandBazaar\src\Ethereum
directory and runnpm run test:run:server
. - In Visual Studio Code terminal run
npm run test:coverage
.
- In a command line window go to
-
https://ropsten.etherscan.io/address/0xfecbe56b42eafa213461c70e6babf54750375570
-
https://ropsten.etherscan.io/address/0x2a99ab3b2d7de551db599934e39a9f496c99f8b9 (backup :))
- MIT