leo icon indicating copy to clipboard operation
leo copied to clipboard

[Feat] Deploy new programs and execute on-chain programs from the command line

Open evan-schott opened this issue 9 months ago • 1 comments

  • leo deploy:
    • Can now easily deploy programs to custom networks, with custom broadcast endpoints, all while using private or public fees.
    • Now supports easy deployment of projects that contain any depth of dependencies by specifying --recursive. Customizable parameter --wait <SECONDS> to specify how long to wait between nested program deployments to help avoid a parent program from reaching a snarkOS node before its child.
  • leo execute:
    • Can now easily execute existing on-chain programs, even if they don't match the current directory you are in.
  • Examples:
    • leo deploy --endpoint "http://0.0.0.0:3030" --private-key "<INSERT PRIVATE_KEY>"
    • leo execute --program football_players_v001.aleo add_player "{player_id: 1000field,team_id: 1field,position: 1field,attack: 1u128,defense: 1u128,speed: 1u128,power: 1u128,stamina: 1u128,technique: 1u128,goalkeeping: 1u128}" --endpoint "http://0.0.0.0:3030" --private-key "<INSERT PRIVATE KEY>" --broadcast --record "<INSERT RECORD>"
    • leo execute --program credits.aleo --endpoint "http://0.0.0.0:3030" --private-key "<INSERT PRIVATE_KEY 1>" --broadcast transfer_public_to_private <INSERT RECIPIENT ADDRESS> 5000000u64
  • Previous discussion

evan-schott avatar May 01 '24 00:05 evan-schott

Codecov Report

Attention: Patch coverage is 0% with 41 lines in your changes are missing coverage. Please review.

Project coverage is 75.98%. Comparing base (32aedab) to head (4c7b727). Report is 1 commits behind head on mainnet.

Files Patch % Lines
leo/cli/commands/execute.rs 0.00% 20 Missing :warning:
leo/cli/commands/deploy.rs 0.00% 17 Missing :warning:
errors/src/errors/package/package_errors.rs 0.00% 3 Missing :warning:
errors/src/errors/cli/cli_errors.rs 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           mainnet   #27928      +/-   ##
===========================================
- Coverage    76.59%   75.98%   -0.61%     
===========================================
  Files          208      208              
  Lines         7215     7282      +67     
  Branches      7215     7282      +67     
===========================================
+ Hits          5526     5533       +7     
- Misses        1689     1749      +60     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 01 '24 02:05 codecov[bot]