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

@swapi-finance/contracts

v0.8.9

Published

Contracts for Swapi Finance ๐Ÿ

Downloads

16

Readme

Swapi Smart Contracts

This repo contains all of the smart contracts used to run Swapi.

Deployed Contracts

none on mainnet.

Used Contracts

Frontend uses Quickswap already deployed contracts

Polygon Mumbai Testnet

Factory address: 0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32

Router address: 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff

Polygon Mainnet

Factory address (Quickswap): 0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32

Router address: 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff

Running

These contracts are compiled and deployed using Hardhat. They can also be run using the Remix IDE.

To prepare the dev environment, run yarn install. To compile the contracts, run yarn compile. Yarn is available to install here if you need it.

Accessing the ABI

If you need to use any of the contract ABIs, you can install this repo as an npm package with npm install --dev @swapi-finance//contracts. Then import the ABI like so: import { abi as IUniswapV2PairABI } from '@swapi-finance//contracts/artifacts/contracts/swapi-core/interfaces/IUniswapV2Pair.sol/IUniswapV2Pair.json'.

Attribution

These contracts were adapted from these repos: My Baker baguette-exchange : [contracts] (https://github.com/baguette-exchange/contracts) Uniswap : uniswap-v2-core, uniswap-v2-periphery, and uniswap-lib.

Synthetix's StakingRewards: https://github.com/Synthetixio/synthetix/blob/v2.98.2/contracts/StakingRewards.sol Tests: https://github.com/Synthetixio/synthetix/blob/v2.98.2/test/contracts/StakingRewards.js

vittominacori (Vittorio Minacori)'sETH Token Recover: https://vittominacori.github.io/eth-token-recover/ https://github.com/vittominacori/eth-token-recover

Warning

First Forge tests compilation

In case compilation fails with the following error:

[โ Š] Compiling...
Error:
Encountered invalid solc version in test/StakingRewards.t.sol: Failed to parse solidity version >= 0.6.0 <=0.8.0: unexpected character ',' while parsing major version number

Set the solc version by adding in foundry.toml:

  auto_detect_solc = false
  solc = "0.8.23"

run once then revert the changes.

Tests

tests contracts compilation takes up to 20+ Gb of RAM, so be sure to have enough memory available before doing so.

Github actions for running tests are disabled for now, as they are not able to compile the contracts due to the memory limit (12-16 Gb).


Tests currently not working:
 - test/eth-token-recover