Giter VIP home page Giter VIP logo

linktoken's Introduction

LINK Token Contracts

The LINK token is an EIP20 token with additional ERC677 functionality.

The total supply of the token is 1,000,000,000, and each token is divisible up to 18 decimal places.

To prevent accidental burns, the token does not allow transfers to the contract itself and to 0x0.

Security audit for 0.4 version of the contracts is available here.

Details

Setup

The project contains 0.4 contracts that were used for LINK Ethereum Mainnet deployment in 2017. For deployments moving forward, we use the updated 0.6 contracts which use a more recent version of solc and the OpenZeppelin token standards. These updates include a minor ABI change around approval/allowance naming.

To mitigate supply chain attack type of risk, we currently avoid using NPM modules to pull Solidity vendor code, but instead use git submodules. Make sure you pull submodules explicitly:

git submodule update --init --recursive

After submodules are updated, we can run:

yarn

Setup contracts:

yarn setup

NOTICE: This will compile all versions of the contracts, but as Hardhat doesn't have robust support for multiple Solidity versions the resulting artifacts will include only final (latest) compiler output. To make sure you compile the specific version please use the specific command:

Setup v0.6 contracts using Solidity 0.6 compiler:

build:contracts:0.6

ABI

You can also find interfaces and ABIs after running through the install yarn setup process.

Testing

Run tests:

yarn test

This will run unit tests for all versions of the contracts.

Integration testing

Integration tests are currently setup for Optimism contracts, and to run them make sure you have a local network running first.

The network can be started using a helpful script, which will clone the Optimism monorepo, build the :

yarn script:oe:up

Run tests:

yarn test --network optimism

This will run unit tests for all versions of the contracts, plus supported integration tests against the local L1 & L2 networks.

The network can be stopped using another script:

yarn script:oe:down

Or use the clean script, which will also delete all the images:

yarn script:oe:clean

linktoken's People

Contributors

se3000 avatar krebernisak avatar dependabot[bot] avatar thodges-gh avatar patrickalphac avatar rupurt avatar cleanunicorn avatar davidwparker avatar henrynguyen5 avatar j16r avatar

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.