Coder Social home page Coder Social logo

utone / apeswap-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apeswapfinance/apeswap-contracts

0.0 0.0 0.0 2.4 MB

A collection of smart contract tools and interfaces used by ApeSwap.

License: MIT License

JavaScript 41.32% Solidity 47.43% Shell 11.24%

apeswap-contracts's Introduction

ApeSwap

ApeSwap Contracts

A collection of smart contract tools and interfaces used by ApeSwap..

Features

  • Factories: Turn a contract into a factory using the contract address as an implementation with Clones or TransparentUpgradeableProxy

  • Sweeper: Sweep any ERC-20 or NFT locked in a contract with this utility.

Installation

  1. Create a GitHub personal access token

  2. Create a .npmrc file at the root of this repo or at your $HOME dir and add the following lines, replacing <NPM_TOKEN> with yours

//npm.pkg.github.com/:_authToken=<NPM_TOKEN>
@apeswapfinance:registry=https://npm.pkg.github.com
  1. yarn add @apeswapfinance/contracts

Usage

Once installed, you can use the contracts in the library by importing them:

pragma solidity ^0.8.0;

import "@apeswapfinance/contracts/utils/Sweeper";

contract MyContract is Sweeper {
    constructor(address[] lockedTokens) Sweeper(lockedTokens) {
    }
}

If you're new to smart contract development, head to Developing Smart Contracts to learn about creating a new project and compiling your contracts.

To keep your system secure, you should always use the installed code as-is, and neither copy-paste it from online sources, nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs.

Contribute

ApeSwap Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the contribution guide!

License

ApeSwap Contracts is released under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.