Offer Up is a simple Dapp for the Agoric smart contract platform that permits users to explore items for sale in a marketplace, displaying default options of maps, potions, and scrolls. Users can select up to three items in any combination, create an offer starting from 0.25 IST, and upon transaction confirmation, receive the chosen items in their wallet while the offered amount is deducted from their balance.
Detailed instructions regarding setting up the environment with a video walkthrough is available at Your First Agoric Dapp tutorial. But if you have the environment set, i.e., have correct version of node, yarn, docker, and Keplr wallet installed, below are the steps that you need to follow. You can also use the same instructions to follow along in Github Codespaces without any installation or downloads on your local machine, apart from Keplr which is needed to connect to dApp.
yarn install
command to install any solution dependencies. Downloading all the required dependencies may take several minutes. The UI depends on the React framework, and the contract depends on the Agoric framework. The packages in this project also have development dependencies for testing, code formatting, and static analysis.yarn start:docker
command.yarn docker:logs
to check the logs. Once your logs resemble the following, stop the logs by pressing ctrl+c
.
demo-agd-1 | 2023-12-27T04:08:06.384Z block-manager: block 1003 begin
demo-agd-1 | 2023-12-27T04:08:06.386Z block-manager: block 1003 commit
demo-agd-1 | 2023-12-27T04:08:07.396Z block-manager: block 1004 begin
demo-agd-1 | 2023-12-27T04:08:07.398Z block-manager: block 1004 commit
demo-agd-1 | 2023-12-27T04:08:08.405Z block-manager: block 1005 begin
demo-agd-1 | 2023-12-27T04:08:08.407Z block-manager: block 1005 commit
PORTS
in bottom-right panel, and make all listed ports public
by selecting Port Visibility
after right-click.yarn start:contract
to start the smart contract. yarn start:ui
to start the smart contract. You can use the link in the output to load the smart contract UI in a browser.For any troubleshooting please refer to the detailed tutorial at Here.
To run the unit test:
yarn test
to run the unit testsTo run the end to end test:
yarn test:e2e --browser chrome
to run the end to end tests; you may replace chrome
with your favorite browser name. Although chrome
is the recommended browser to run end to end tests at this point.See CONTRIBUTING for more on contributing to this repo.