Insrt V2 Solidity Smart Contracts
make install
make update
make build
make test
make start-anvil
make stop-anvil
Note: All deployments must have the following environment variables set:
DEPLOYER_KEY
: Private key of the deployer account
Requires the following additional environment variables set:
ARBITRUM_RPC_URL
: Arbitrum RPC URLARBISCAN_API_KEY
: Arbiscan API key for contract verification
make deploy-arb
Requires the following additional environment variables set:
ARBITRUM_SEPOLIA_RPC_URL
: Arbitrum Sepolia RPC URLARBISCAN_API_KEY
: Arbiscan API key for contract verification
make deploy-arb-sepolia
Requires the following additional environment variables set:
ARBITRUM_SEPOLIA_RPC_URL
: Arbitrum Sepolia RPC URLARBISCAN_API_KEY
: Arbiscan API key for contract verification
make deploy-arb-sepolia-custom
Requires the following additional environment variables set:
ARBITRUM_RPC_URL
: Arbitrum RPC URL for forking the initial local state
make deploy-local-arb
Requires the following additional environment variables set:
BASE_RPC_URL
: Base RPC URLBASESCAN_API_KEY
: Basescan API key for contract verification
make deploy-base
Requires the following additional environment variables set:
BASE_SEPOLIA_RPC_URL
: Base Sepolia RPC URLBASESCAN_API_KEY
: Basescan API key for contract verification
make deploy-base-sepolia
Requires the following additional environment variables set:
BASE_RPC_URL
: Base RPC URL for forking the initial local state
make deploy-local-base
Requires the following additional environment variables set:
BLAST_RPC_URL
: Blast RPC URLBLASTCAN_API_KEY
: Blastscan API key for contract verification
make deploy-blast
Requires the following additional environment variables set:
BLAST_SEPOLIA_RPC_URL
: Blast Sepolia RPC URLBLASTCAN_API_KEY
: Blastscan API key for contract verification
make deploy-blast-sepolia
Requires the following additional environment variables set:
BLAST_SEPOLIA_RPC_URL
: Blast Sepolia RPC URLBLASTCAN_API_KEY
: Blastscan API key for contract verification
make deploy-blast-sepolia-custom
- Token configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-token-arb.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-arb
- VRF configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-vrf-arb.sh
:
LINK_FUND_AMOUNT
LINK_TOKEN
NEW_VRF_OWNER
VRF_SUBSCRIPTION_BALANCE_THRESHOLD
make configure-vrf-arb
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-perp-mint-arb.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
VRF_KEY_HASH
make configure-perp-mint-arb
- Token configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-token-arb-sepolia.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-arb-sepolia
- VRF configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-vrf-arb-sepolia.sh
:
LINK_FUND_AMOUNT
LINK_TOKEN
NEW_VRF_OWNER
VRF_SUBSCRIPTION_BALANCE_THRESHOLD
make configure-vrf-arb-sepolia
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-vrf-arb-sepolia-custom.sh
:
NEW_VRF_OWNER
VRF_FULFILLER
make configure-vrf-arb-sepolia-custom
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-perp-mint-arb-sepolia.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
VRF_KEY_HASH
make configure-perp-mint-arb-sepolia
- Token configuration
Note: The following environment variables are modifiable in ./script/common/post-deployment/configure-token-local.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-local-arb
- VRF configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-vrf-local.sh
:
LINK_FUND_AMOUNT
LINK_TOKEN
NEW_VRF_OWNER
VRF_SUBSCRIPTION_BALANCE_THRESHOLD
make configure-vrf-local-arb
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Arbitrum/post-deployment/configure-perp-mint-local.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
VRF_KEY_HASH
make configure-perp-mint-local-arb
- Token configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-token-base.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-base
- VRF configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-vrf-base.sh
:
ETH_FUND_AMOUNT
make configure-vrf-base
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-perp-mint-base.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
make configure-perp-mint-base
- Token configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-token-base-sepolia.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-base-sepolia
- VRF configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-vrf-base-sepolia.sh
:
ETH_FUND_AMOUNT
make configure-vrf-base-sepolia
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-perp-mint-base-sepolia.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
make configure-perp-mint-base-sepolia
- Token configuration
Note: The following environment variables are modifiable in ./script/common/post-deployment/configure-token-local.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-local-base
- VRF configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-vrf-local.sh
:
ETH_FUND_AMOUNT
make configure-vrf-local-base
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Base/post-deployment/configure-perp-mint-local.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
make configure-perp-mint-local-base
- Token configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-token-blast.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-blast
- VRF configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-vrf-blast.sh
:
ETH_FUND_AMOUNT
make configure-vrf-blast
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-perp-mint-blast.sh
:
BLAST_YIELD_RISK
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
make configure-perp-mint-blast
- Token configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-token-blast-sepolia.sh
:
NEW_TOKEN_PROXY_OWNER
TOKEN_DISTRIBUTION_FRACTION_BP
make configure-token-blast-sepolia
- VRF configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-vrf-blast-sepolia.sh
:
ETH_FUND_AMOUNT
make configure-vrf-blast-sepolia
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-vrf-blast-sepolia-custom.sh
:
NEW_VRF_OWNER
VRF_FULFILLER
make configure-vrf-blast-sepolia-custom
- PerpetualMint configuration
Note: The following environment variables are modifiable in ./script/Blast/post-deployment/configure-perp-mint-blast-sepolia.sh
:
COLLECTION_CONSOLATION_FEE_BP
DEFAULT_COLLECTION_REFERRAL_FEE_BP
MINT_EARNINGS_BUFFER_BP
MINT_FEE_BP
MINT_FOR_ETH_CONSOLATION_FEE_BP
MINT_TOKEN_CONSOLATION_FEE_BP
MINT_TOKEN_TIER_MULTIPLIERS
MINT_TOKEN_TIER_RISKS
NEW_PERP_MINT_OWNER
REDEMPTION_FEE_BP
TIER_MULTIPLIERS
TIER_RISKS
make configure-perp-mint-blast-sepolia
Note: All upgrades must have the following environment variables set:
DEPLOYER_KEY
: Private key of the deployer account
Requires the following additional environment variables set:
ARBITRUM_RPC_URL
: Arbitrum RPC URLARBISCAN_API_KEY
: Arbiscan API key for contract verification
make upgrade-remove-perp-mint-arb
make upgrade-remove-perp-mint-view-arb
make upgrade-split-perp-mint-arb
make upgrade-perp-mint-arb
make upgrade-perp-mint-admin-arb
make upgrade-perp-mint-view-arb
make upgrade-token-arb
Requires the following additional environment variables set:
ARBITRUM_SEPOLIA_RPC_URL
: Arbitrum Sepolia RPC URLARBISCAN_API_KEY
: Arbiscan API key for contract verification
make upgrade-remove-perp-mint-arb-sepolia
make upgrade-remove-perp-mint-view-arb-sepolia
make upgrade-split-perp-mint-arb-sepolia
make upgrade-perp-mint-arb-sepolia
make upgrade-perp-mint-admin-arb-sepolia
make upgrade-perp-mint-view-arb-sepolia
make upgrade-token-arb-sepolia
Requires the following additional environment variables set:
BLAST_RPC_URL
: Blast RPC URLBLASTSCAN_API_KEY
: Blastscan API key for contract verification
make upgrade-remove-perp-mint-view-blast
make upgrade-split-perp-mint-blast
make upgrade-perp-mint-admin-blast
make upgrade-perp-mint-blast
make upgrade-perp-mint-view-blast
Requires the following additional environment variables set:
BLAST_SEPOLIA_RPC_URL
: Blast Sepolia RPC URLBLASTSCAN_API_KEY
: Blastscan API key for contract verification
make upgrade-remove-perp-mint-view-blast-sepolia
make upgrade-split-perp-mint-blast-sepolia
make upgrade-perp-mint-admin-blast-sepolia
make upgrade-perp-mint-view-blast-sepolia
Requires the following additional environment variables set:
ARBITRUM_RPC_URL
: Arbitrum RPC URL
make calculate-mint-result-arb <mint-collection-address> <number-of-mint-attempts> <randomness> <price-per-mint> <prize-value>
Requires the following additional environment variables set:
BASE_RPC_URL
: Base RPC URL
make calculate-mint-result-base <mint-collection-address> <number-of-mint-attempts> <randomness_signature-index-1> <randomness-signature-index-2> <price-per-mint> <prize-value>
Requires the following additional environment variables set:
BLAST_RPC_URL
: Blast RPC URL
make calculate-mint-result-blast <mint-collection-address> <number-of-mint-attempts> <randomness-signature-index-1> <randomness-signature-index-2> <price-per-mint> <prize-value> <referral-mint>