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

saturn-protocol-ethers

v0.0.1

Published

Saturn Protocol - Hardhat Typechain Ethers

Downloads

3

Readme

saturn-protocol-ethers

Learn more:

  • Website -> https://saturn.network
  • Deployed on ETH -> https://etherscan.io/address/0xaA5bBD5A177A588b9F213505cA3740b444Dbd586#code

Installation:

  • yarn add saturn-protocol-ethers or npm install saturn-protocol-ethers

Disclaimer

Team Saturn accepts no responsibility for any lost funds due to tokens not being compatible with Saturn Protocol's order book contracts. If any of the trading tests outlined in our self listing guide fail for your token, then do not announce your listing as your token's smart contract is not compatible with our exchange protocol. Reach out via the form below and we will investigate together.

Contact Team Saturn

Upgrades

  • ethers v5
  • hardhat
  • typechain

Example

import { providers } from 'ethers'
import { Exchange__factory, exchanges } from 'saturn-protocol-dione'

const provider = new providers.JsonRpcProvider(
  'https://ethercluster.com/etc',
  { name: 'etc', chainId: 61 }
)

const { contractAddress } = exchanges.latest('ETC')

const exchange = Atlas__factory.connect(contractAddress, provider)

exchange.treasury().then(console.log)

Supported tokens

The protocol supports self-listing of properly developed ERC20 and ERC223 standard tokens. Most tokens, such as SATURN, DAI, LINK are tradable out of the box.

If you or your developers have made any modifications to the source code of ERC20 or ERC223 standards, your token might not be able to work with Saturn Protocol. Furthermore, due to a vulnerability in ERC20 design your ERC20 tokens may get permanently lost if mishandled!

While 99% of all existing tokens are supported out of the box, you should go through the full self listing guide to ensure your community will have a smooth and secure trading experience.

Reference implementations that are guaranteed to work:

  • https://github.com/saturn-network/wetc223
  • https://github.com/smartcontractkit/LinkToken

Reference ABIs

ERC223

contract ERC223 {
  uint public totalSupply;
  function balanceOf(address who) constant public returns (uint);

  function name() constant public returns (string _name);
  function symbol() constant public returns (string _symbol);
  function decimals() constant public returns (uint8 _decimals);
  function totalSupply() constant public returns (uint256 _supply);

  function transfer(address to, uint value) public returns (bool ok);
  function transfer(address to, uint value, bytes data) public returns (bool ok);
  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event ERC223Transfer(address indexed _from, address indexed _to, uint256 _value, bytes _data);
}

ERC20

contract ERC20 {
  function totalSupply() public view returns (uint);
  function balanceOf(address holder) public view returns (uint);
  function allowance(address holder, address other) public view returns (uint);

  function approve(address other, uint amount) public returns (bool);
  function transfer(address to, uint amount) public returns (bool);
  function transferFrom(address from, address to, uint amount) public returns (bool);
}