A blockchain application that helps automatically select the best blockchain to facilitate a given transaction based on the requirements of the payment.
- Chainlink: Performs price comparison against Layer1 currencies
- Tellor: Performs price comparison against Layer1 currencies
- Skale: Enables private networks for deploying invoices and collecting payments.
- Torus: Can use metamask (and/or Torus based authentication via email) to authenticate to Layer 1 contracts, and layer 2 ZkSync API service.
- Starkware (Cairo) - Program that validates the best token selection based on speed and fee criteria.
- ZkSync - Fetches supported tokens, performs quote estimates for different currencies supported by the vendor, performs the transaction against Layer2 network using the protocol of choice.
Run the following services/commands in different terminal windows starting from the root directory of this project:
-
Install dependencies when running for the first time:
yarn
-
Start local chain:
yarn chain
-
Deploy smart contract
yarn deploy
-
Start client website:
yarn start
If successful Primechoice Select should now be ready and available on localhost:3000
- Update
defaultNetwork
in hardhat.config.js in hardhat package> - Update
TARGET_NETWORK_NAME
in constants.js in react package.
- Merchant wants to collect a payment with optimal fees
- Login with Torus or Metamask to register a new payment.
- Create as one time or subscription Payment (choose subscription), ask for example tokens.
- Generate a url - url can be shared with the buyer or on your website.
- Every payment gets it's own unique url and can only be claimed once.
- Enter payment address.
- Show token options and previewing contract.
- Submit payment / discuss recurring payments and low per-transaction cost. Stripe for example takes a flat fee of every transaction which can already exceed that of a single layer 2 withdrawl if subscription payments batched strategically.
- Stackware/Cairo verification of optimal contract (show input and request parameters, their definitions, and proof of best output).
Home
Payment Contract
Payer screen
Cairo: Deploying optimal proof via Cairo
Torus: Log in with Torus
SKALE: Deploying to a private network
SKALE: Selecting Skale network for Primechoice Select