SRA Enable Token

Fork me on GitHub

Rendered

Live demos require a web3 client. We recommend installing Metamask. Live demos require an unlocked web3 client. Please unlock your client.

<or-sra sra="#SRA_ENDPOINT#" feeRecipient="#FEE_RECIPIENT_ADDRESS#">
  MBGN Trading: <or-sra-enable-token token="0xdde19c145c1ee51b48f7a28e8df125da0cc440be0"></or-sra-enable-token>
</or-sra>

Installation

yarn add @openrelay/sra-enable-token

Description

The <or-sra-enable-token> element provides a button to enable or disable trading of a given ERC20 token. By default, it will enable trading on the exchange indicated by the ancestor <or-sra> tag, but it can be configured to set allowances for other Ethereum addresses.

The <or-sra-enable-token> must fall under an <or-sra> tag.

API

HTML Attributes
  • token (required) — The ERC20 token to enable trading on.
  • enabled [default=true] — If false, the button is disabled.
  • quantity [default=unlimited] — The amount of the token (in base units) to enable for trading.
  • operatorAddress [default=0x asset proxy] — The address being granted an allowance.