Uniswap核心合约源码下载

Uniswap是一种基于以太坊的协议,旨在促进ETH和ERC20 代币数字资产之间的自动兑换交易,在以太坊上自动提供流动性。Uniswap完全部署在链上,任何个人用户,只要安装了去中心化钱包软件都可以使用这个协议。Uniswap也可以被认为是一个DeFi项目,因为它试图利用去中心化协议来让数字资产交易过程中彻底实现去中介化。

Local deployment

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

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

Using solidity interfaces

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

import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';

contract MyContract {
  IUniswapV3Pool pool;

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

Licensing

The primary license for Uniswap V3 Core is the Business Source License 1.1 (BUSL-1.1

区块链毕设网(www.qklbishe.com)全网最靠谱的原创区块链毕设代做网站
部分资料来自网络,侵权联系删除!
资源收费仅为搬运整理打赏费用,用户自愿支付 !
qklbishe.com区块链毕设代做网专注|以太坊fabric-计算机|java|毕业设计|代做平台 » Uniswap核心合约源码下载

提供最优质的资源集合

立即查看 了解详情