SplitMate - Smart Contract

Built with ink! Twitter Follow

SplitMate is an app to simplify the way we share expenses within a group of friends. It allows users to track and split expenses such as concert tickets, vacations, dinners, and other shared bills. With Splitmate, users can avoid misunderstandings.

Docs

UI

The frontend code repository is here

Environment setup

The smart contract is built using ink!, an eDSL to write smart contracts in Rust for Polkadot blockchains built on the Substrate framework.

To compile the smart contract, Rust and Cargo are required. Here is an installation guide.

cargo-contract is required too. Install it using this command:

cargo install cargo-contract --force --locked

Build smart contract

To build the smart contract and generates the optimized WebAssembly bytecode, the metadata and bundles, execute this command:

cargo contract build --release

Run tests off-chain

To run the tests off-chain, execute this command:

cargo test

Upload & instantiate

Open the Substrate Contracts-UI.

Choose a chain (E.g. Contracts (Rococo) or Shibuya) in the dropdown placed in the top section of the left menu.

Follow the official ink! guide to upload and instantiate the smart contract.

ink! version

ink: 4.0.0

https://github.com/paritytech/ink/tree/v4.0.0