avalanche-cli icon indicating copy to clipboard operation
avalanche-cli copied to clipboard

add app examples to the local/devnet deployment flow

Open felipemadero opened this issue 10 months ago • 1 comments

adding the application examples (e.g. what's in this repo: https://github.com/ava-labs/teleporter-token-bridge or here) to the deployment flow so devs not only have the subnet deployed and warp / teleporter enabled, but can actually test out some fun stuff like bridging tokens

felipemadero avatar Apr 11 '24 20:04 felipemadero

First proposal is to add a couple questions to avalanche subnet create after enabling teleporter . related to also deploying certain applications. Do you want to deploy a standard dapp in your subnet? , then giving a list of options, also adding an option for a custom one (based on url) Second proposal (the two are not mutually exclusive), is to have a contract deploy command, that asks the same questions, but can be used anytime after subnet creation/deploy. something like this forge command with these options: forge create --rpc-url --private-key (edited) will have to see what the best way for a user to enter constructor args would be

  • provide a list of desirable apps
  • download (and keep somewhere) a versioned dapp release if available, so avoiding the extra compilation step
  • download the dapp source code from a given github url
  • auto install foundry
  • compile if needed
  • deploy
  • verify (public networks, needs explorer, foundry create command option, https://snowscan.xyz/apis related)
  • constructor args step

we have a few e2e applications of teleporter in the starter kit, they are very simple, for example: These instructions for deploying a one-way lane to send and receive teleporter messages https://github.com/ava-labs/avalanche-starter-kit/tree/main?tab=readme-ov-file#issuing-transactions-with-foundry based on the contracts in this folder: https://github.com/ava-labs/avalanche-starter-kit/tree/main/src/0-send-receive

also: have a way to help interact with the deployed contract using cli

felipemadero avatar Apr 24 '24 17:04 felipemadero