<or-sra sra="#SRA_ENDPOINT#" feeRecipient="#FEE_RECIPIENT_ADDRESS#"> Your content goes here </or-sra>
SRA ElementFork me on GitHub
yarn add @openrelay/sra-element
<or-sra> element extends the
<or-web3> element with
properties specific to 0x trading. The
<or-sra> element includes all of the
functionality of the
<or-web3> tag, so you do not need both at the same time.
Certain widgets will require an
<or-sra> as an ancestor, but widgets that
<or-web3> ancestor can have that need met by an
<or-sra> tag provides its children with information about the 0x Relayer
and the 0x Exchange contract. Any time those properties change, they will be
automatically propagated to their children.
sra[default=https://api.openrelay.xyz] — The Standard Relayer API endpoint.
feeRecipient[default=0xfaec02c3474b1a1c553eddf3df27946643cc7122] — The feeRecipient address to associcate with orders.
sender[default=0x0000000000000000000000000000000000000000] — The sender who must submit orders to be filled.
<or-web3> element for additional events.
sra-child— An event emitted when a child element is registered. The event must include an attribute
e.detail.elementindicating the newly added element. The
<or-sra>element will respond with a
sra-readyevent, and will notify the registered element on future sra changes.
None of the following events are emitted directly from the
<or-sra> tag triggers them directly on one or more registered
sra-ready— Fired when SRA details are confirmed and available. The event includes the following details:
sra: The standard relayer API endpoint to use
feeRecipient: The fee recipient address to use for new orders
exchangeAddress: The exchange address to use for new orders
feeTokenAddress: The ZRX token address for this network
erc20ProxyAddress: The ERC20 token transfer proxy for this exchange
wethAddress: The wrapped ether contract address for this networks
epoch: The epoch for the connected user.