npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@openrelay/sra-fee-element

v0.1.1

Published

A lit-element that lets the user select a fee

Downloads

1

Readme


layout: widget title: "SRA Fees" date: 2018-09-26 09:00:00 -0500 categories: widgets package: sra-fee-element code: html: |

<or-sra sra="#SRA_ENDPOINT#" feeRecipient="#FEE_RECIPIENT_ADDRESS#">
  <or-sra-fee></or-sra-fee>
</or-sra>

npm: "@openrelay/sra-fee-element"

The <or-sra-fee> element provides a slider to enable the user to allocate fees between the maker and the taker. OpenRelay allows makers to allocate fees between the maker and the taker, so long as the total fee adds up to the specified fees. If you are using this widget library with a different Relayer, make sure you understand their requirements with respect to fee allocation.

API

HTML Attributes
  • totalFee [default=provided by relayer] — By default, the fee widget will query the relayer to get the totalFee required. Applications can set this value higher than the relayer specifies, but not lower.
  • makerAssetAddress — Relayers may adjust the required fee based on the asset being traded. Specify the maker token address for more accurate fee requirements.
  • takerAssetAddress — Relayers may adjust the required fee based on the asset being traded. Specify the taker token address for more accurate fee requirements.
  • account [default=web3.eth.accounts[0]] — The maker account associated with these fees. By default, it will be the account associated with the web3 object, but that can be overridden.
  • disabled [default=false] — Prevents the user from changing the value.
JavaScript Properties
  • value — The percentage of the fee to be paid by the taker, as an integer between 0 and 100.
  • makerFee — A BigNumber indicating the number of base units of ZRX to be paid by the maker.
  • takerFee — A BigNumber indicating the number of base units of ZRX to be paid by the taker.
Events
Outgoing Events
  • change — Fired when the user changes the token. The event.details object includes:
    • feeRecipient: The fee recipient address to be used for the order
    • makerFee: A BigNumber indicating the number of base units of ZRX to be paid by the maker.
    • takerFee: A BigNumber indicating the number of base units of ZRX to be paid by the taker.