For Contributors
Smart Contract Payments

Smart Contracts

ERC-20 Token PORTR

It is a standard ERC-20 smart contract with a few additions, namely:

  • open mint() with a fixed price, which is maintained by Chainlink.
    • the smart contract on Taiko Mainnet is using Pyth data feed through the Chainlink interface
    • it allows for minting by sending the native token as the payable, the rate of which is set by the Chainlink price feed
  • adminMint() is only called by the owner to mint without having to pay
    • this is used for internal usage and enterprise-onboarding
  • applyToAccount() used for adding balance to a tenant
    • initiates a burn and emits an event, which is used to increase the account balance within the gateway
  • sweep() and sweepToken()
    • allows the operator to withdraw token balances of the contract, both native and ERC-20, or settling internal accounts
    • this enables coverage of POKT relay costs
    • it completes the lifecycle of the smart contract

Pyth Integration

The Taiko deployment of the smart contract has a dependency of the Pyth wrapper for Chainlink. It has been deployed by us, but the code-base is not maintained by PORTERS. The wrapper is then connected to our implementation as the price feed for minting.

A script (opens in a new tab) for deploying this wrapper exists and has to be modified for deploying any other price feed (currently ETH/USD).

Smart Contract Deployments