npm

@pollum-io/v2-core

0.0.3 • Public • Published

Pegasys V2

Lint Tests Fuzz Testing Mythx npm version

This repository contains the core smart contracts for the Pegasys V2 Protocol. For higher level contracts, see the v2-periphery repository.

Local deployment

In order to deploy this code to a local testnet, you should install the npm package @pollum-io/v2-core and import the factory bytecode located at @pollum-io/v2-core/artifacts/contracts/PegasysV2Factory.sol/PegasysV2Factory.json. For example:

import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@pollum-io/v2-core/artifacts/contracts/PegasysV2Factory.sol/PegasysV2Factory.json'

// deploy the bytecode

This will ensure that you are testing against the same bytecode that is deployed to mainnet and public testnets, and all Pegasys code will correctly interoperate with your local deployment.

Using solidity interfaces

The Pegasys V2 interfaces are available for import into solidity smart contracts via the npm artifact @pollum-io/v2-core, e.g.:

import '@pollum-io/v2-core/contracts/interfaces/IPegasysV2Pool.sol';

contract MyContract {
  IPegasysV2Pool pool;

  function doSomethingWithPool() {
    // pool.swap(...);
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @pollum-io/v2-core

Homepage

pegasys.fi

Weekly Downloads

2

Version

0.0.3

License

gpl-3.0

Unpacked Size

490 kB

Total Files

50

Last publish

Collaborators

  • davidpotolski
  • clausss
  • lucasgabrielgsp
  • thomgabriel
  • gabrielprediger
  • canokaue