Contract that defines the type need when your want to create a vending machine on your chain.
This blocklet is a minimalistic implementation of a smart contract that can be compiled and deploy to forge powered blockchain. It just contains one new
Transaction type and message types required to compose that transaction.
If you are new to forge smart contracts, you can use this blocklet as a starting point to learn and explore it's workflow and composing guidelines.
If you want to create an
AssetFactory, so that users can send
AcquireAssetTx later in your dApp, you should look at this contract.
Software requirements are:
- Node.js runtime v10+ installed
- Latest forge cli installed with:
npm install -g @arcblock/forge-cli
elixir >= 1.9.0, and can run
Knowledge requirements are:
- Basic ideas and formats around google protocol buffers
- Basic syntax and format of yaml
- Basic command line usage experience
forge blocklet:use forge-product-factory-contractto get the contract files
forge protocol:compile ./protocolto compile the contract
forge protocol:deploy .compiled/create_product/elixir/create_product/create_product.itx.jsonto deploy the contract
node demo.jsto test with the example