Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ LAUNCH_TOKEN_SYMBOL="TKN"
LAUNCH_TOKEN_URI="https://www.example.com/"
MINIMUM_RAISE_AMOUNT="10"
SECONDS_FOR_LAUNCH="10"
LAUNCH_ADDRESS="" #used for starting and completing a launch
LAUNCH_ADDRESS="" #used for starting and completing a launch
SURFPOOL_DATASOURCE_RPC_URL="https://api.mainnet-beta.solana.com"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ test-ledger
scripts/*.js
.env
# Test ledger accounts - used when dumping accounts from mainnet to localnet
test-ledger-accounts
test-ledger-accounts
# Surfpool
.surfpool/
59 changes: 59 additions & 0 deletions runbooks/deploy-local-programs.tx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
////////////////////////////////////////////////////////////////
// Deploy all active program binaries and clone them to their
// real mainnet program addresses on the local surfnet.
////////////////////////////////////////////////////////////////

addon "svm" {
rpc_api_url = input.rpc_api_url
network_id = input.network_id
}

action "deploy_stack" "svm::setup_surfnet" {
description = "Deploy all active program binaries and clone to real program addresses"

// Core governance + markets
deploy_program {
program_id = "FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq"
binary_path = "./target/deploy/futarchy.so"
}
deploy_program {
program_id = "VLTX1ishMBbcX3rdBWGssxawAo1Q2X2qxYFYqiGodVg"
binary_path = "./target/deploy/conditional_vault.so"
}
deploy_program {
program_id = "WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx"
binary_path = "./target/deploy/bid_wall.so"
}

// Launchpad versions (v06 legacy, v07 + v08 current)
deploy_program {
program_id = "MooNyh4CBUYEKyXVnjGYQ8mEiJDpGvJMdvrZx1iGeHV"
binary_path = "./target/deploy/launchpad.so"
}
deploy_program {
program_id = "moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM"
binary_path = "./target/deploy/launchpad_v7.so"
}
deploy_program {
program_id = "moonDJUoHteKkGATejA5bdJVwJ6V6Dg74gyqyJTx73n"
binary_path = "./target/deploy/launchpad_v8.so"
}

// Performance packages + mint governance
deploy_program {
program_id = "pbPPQH7jyKoSLu8QYs3rSY3YkDRXEBojKbTgnUg7NDS"
binary_path = "./target/deploy/price_based_performance_package.so"
}
deploy_program {
program_id = "pPV2pfrxnmstSb9j7kEeCLny5BGj6SNwCWGd6xbGGzz"
binary_path = "./target/deploy/performance_package_v2.so"
}
deploy_program {
program_id = "gvnr27cVeyW3AVf3acL7VCJ5WjGAphytnsgcK1feHyH"
binary_path = "./target/deploy/mint_governor.so"
}
deploy_program {
program_id = "LiQnowFbFQdYyZhF4pUbpsrZCjxRTQ1upKJxZ2VXjde"
binary_path = "./target/deploy/liquidation.so"
}
}
7 changes: 7 additions & 0 deletions surfpool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Load environment variables from .env file
set -a
source .env
set +a

# Start surfpool with deploy-local-programs runbook
surfpool start -r deploy-local-programs
11 changes: 11 additions & 0 deletions txtx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: futarchy
id: futarchy
runbooks:
- name: deploy-local-programs
description: Deploy all active MetaDAO programs to a local Surfnet, cloned to real mainnet program addresses
location: runbooks/deploy-local-programs.tx
environments:
localnet:
network_id: localnet
rpc_api_url: http://127.0.0.1:8899
Loading