1.0.3 • Published 4 months ago

@voltage-finance/v3-core v1.0.3

Weekly downloads
-
License
GPL-2.0-or-later
Repository
-
Last release
4 months ago

Voltage V3

This repository contains the core smart contracts for the Voltage V3 Protocol. For higher level contracts, see the v3-periphery repository.

Local deployment

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

import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@voltage-finance/v3-core/artifacts/contracts/VoltageV3Factory.sol/VoltageV3Factory.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 Voltage code will correctly interoperate with your local deployment.

Using solidity interfaces

The Voltage v3 interfaces are available for import into solidity smart contracts via the npm artifact @voltage-finance/v3-core, e.g.:

import '@voltage-finance/v3-core/contracts/interfaces/IVoltageV3Pool.sol';

contract MyContract {
  IVoltageV3Pool pool;

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

4 months ago

1.0.2

5 months ago