MyGit

Uniswap/v4-periphery

Fork: 486 Star: 709 (更新于 2024-11-11 18:14:38)

license: GPL-2.0

Language: Solidity .

🦄 🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v4

官方网址 GitHub网址

Uniswap v4 Periphery

Uniswap v4 is a new automated market maker protocol that provides extensibility and customizability to pools. v4-periphery hosts the logic that builds on top of the core pool logic like hook contracts, position managers, and even possibly libraries needed for integrations. The v4-periphery contracts in this repository are still in development and further periphery contracts have not yet been built.

Contributing

If you’re interested in contributing please see the contribution guidelines!

Local Deployment and Usage

To utilize the contracts and deploy to a local testnet, you can install the code in your repo with forge:

forge install https://github.com/Uniswap/v4-periphery

If you are building hooks, it may be useful to inherit from the BaseHook contract:


import {BaseHook} from 'v4-periphery/src/base/hooks/BaseHook.sol';

contract CoolHook is BaseHook {
    // Override the hook callbacks you want on your hook
    function beforeAddLiquidity(
        address,
        IPoolManager.PoolKey calldata key,
        IPoolManager.ModifyLiquidityParams calldata params
    ) external override onlyByManager returns (bytes4) {
        // hook logic
        return BaseHook.beforeAddLiquidity.selector;
    }
}

License

The license for Uniswap V4 Periphery is the GNU General Public License (GPL 2.0), see LICENSE.

最近版本更新:(数据更新于 2024-10-06 12:29:14)

Uniswap/v4-periphery同语言 Solidity最近更新仓库

2024-10-03 22:56:46 OpenZeppelin/openzeppelin-contracts

2024-08-28 00:31:10 Uniswap/UniswapX

2024-07-26 11:31:29 bnb-chain/bsc-genesis-contract

2024-02-23 01:47:34 eth-infinitism/account-abstraction

2021-02-26 11:11:11 bnb-chain/eth-bsc-swap-contracts

1970-01-01 00:00:00 bokkypoobah/Tokens