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.
curl -L https://foundry.paradigm.xyz | bash
foundryupforge bforge testFirst enable gas reports in the foundry.toml file:
gas.reports = ['*']Then run tests with the --gas-report flag enabled
forge test --gas-reportDeployment 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 upgradeUUPSThen 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 -vvvvNew artifact files with details of the deployment will be generated if successful.
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.
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!