Skip to content

LOVE20TKM/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

925 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to deploy LOVE20

Step 1: Create a Keystore File

Navigate to directory: script/network

./create_keystore.sh <keystore_name> [private_key]

For example:

# create by private key
./create_keystore.sh test_account 0x...

or

# create a new one
./create_keystore.sh test_account

After executing this command, you will be prompted to enter a password to encrypt the keystore file. Remember this password as you will need to enter it during deployment.

The keystore file will be saved in the ~/.foundry/keystores/ directory.

Step 2: Update Network Configuration

Navigate to script/network/<network> and update the .account file accordingly.

KEYSTORE_ACCOUNT=<keystore_name>
ACCOUNT_ADDRESS=<sender_address>

for example:

KEYSTORE_ACCOUNT=test_account
ACCOUNT_ADDRESS=0x...

Step 3: Deploy Contracts

Now you can use the regular deployment commands to deploy:

Navigate to directory: script/deploy

source 00_init.sh <network>
source 01_deploy_weth.sh
source 02_deploy_uniswapV2Factory.sh
source 0301_deploy_LOVE20_StepByStep.sh
source 0302_initialize_LOVE20_StepByStep.sh
source 0303_verify_LOVE20_StepByStep.sh

All deployed contract addresses can be found in script/network/<network>/address.params.

Step 4: Check Deployed Contracts

Check if the contract initialization parameters are abnormal

Navigate to directory: script/cast

source 000_init.sh <network>
source 999_check.sh

some commands

# get private key
cast wallet decrypt-keystore ~/.foundry/keystores/test_account | grep -o '0x[a-fA-F0-9]\{64\}'

# get account address
cast wallet address $(cast wallet decrypt-keystore ~/.foundry/keystores/test_account | grep -o '0x[a-fA-F0-9]\{64\}')

About

Core smart contracts of LOVE20

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •