diff --git a/.env.example b/.env.example index 4b02162d..23fe61e5 100644 --- a/.env.example +++ b/.env.example @@ -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 \ No newline at end of file +LAUNCH_ADDRESS="" #used for starting and completing a launch +SURFPOOL_DATASOURCE_RPC_URL="https://api.mainnet-beta.solana.com" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 132f95d8..63b3efe5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ test-ledger scripts/*.js .env # Test ledger accounts - used when dumping accounts from mainnet to localnet -test-ledger-accounts \ No newline at end of file +test-ledger-accounts +# Surfpool +.surfpool/ \ No newline at end of file diff --git a/runbooks/deploy-local-programs.tx b/runbooks/deploy-local-programs.tx new file mode 100644 index 00000000..01f684ef --- /dev/null +++ b/runbooks/deploy-local-programs.tx @@ -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" + } +} diff --git a/surfpool.sh b/surfpool.sh new file mode 100755 index 00000000..7f3273aa --- /dev/null +++ b/surfpool.sh @@ -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 \ No newline at end of file diff --git a/txtx.yml b/txtx.yml new file mode 100644 index 00000000..c0d58d39 --- /dev/null +++ b/txtx.yml @@ -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