Skip to content

0xPikapool/contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pikapool Protocol

Smart Contracts

This repository houses the Pikapool smart contracts, including utils, scripts, and tests. All contracts including tests are written in Solidity and managed using Paradigm's Foundry framework.

For more documentation about the nitty-gritty workings of these smart contracts, see the Pikapool documentation pages.

Getting Started

Setting up Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

Compiling the Project

forge b

Running the Tests

forge test

Gas Reports

First enable gas reports in the foundry.toml file:

gas.reports = ['*']

Then run tests with the --gas-report flag enabled

forge test --gas-report

Deployment of Contracts via Provided Scripts

Deployment of these contracts can be performed in your preferred manner, though a deployment script is provided for your convenience in the script directory.

First load your environment variables from a .env file. The bare minimum will of course be a private key and RPC endpoint, but an Etherscan api key may be provided for verification as well.

source .env

/// here Identify which Script function signature you'd like to run, as three separate scenarios are provided for the Pikapool contract framework.

During alpha testing, Pikapool makes use of a 1967 Proxy that interfaces with an UUPS upgradeable proxy for testing stability. If your aim is to upgrade the logic implementation contract behind the 1967 proxy without changing the address of the proxy itself, use the following parameter:

--sig upgradeUUPS

Then set constructor arguments in the script, ensuring that you have provided the correct WETH address for your desired chain and your desired maximum mint amount. Finally run the deployment script:

forge script script/Settlement.s.sol:SettlementScript --rpc-url $DESIREDCHAIN_RPC_URL --broadcast --verify -vvvv

New artifact files with details of the deployment will be generated if successful.

Deployed Settlement Contract Address

Take note of the deployed Settlement contract address as you will need to provide that address to any subsequent Pikapatible NFT project that wishes to use Pikapool's auction engine.

Further testing

Pikapool has written several additional scripts to aid in production testing using Typescript and Go, but they are beyond the scope of this repo. Check the organization's GitHub for more- it's all open source!

About

PikaPool Contracts v0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages