snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

[Bug] Can't executed demo function for local

Open lispking opened this issue 5 months ago • 1 comments

🐛 Bug Report

After successful deployment on local, the function was executed immediately, but an error message was prompted stating that the program ID does not exist.

image

Steps to Reproduce

https://developer.aleo.org/testnet/getting_started/deploy_execute

  1. start local server
snarkos start --nodisplay --dev 0

or

snarkos start --client --nodisplay --dev 0

or 

snarkos start --validator --nodisplay --dev 0
  1. set env
export APPNAME=snarkvm
export NETWORK=testnet3
export PRIVATE_KEY=APrivateKey1xxx
export API_URL=http://localhost:3030
  1. deploy contract
snarkos developer deploy "${APPNAME}.aleo" --private-key "${PRIVATE_KEY}" \
    --path "./build/" \
    --query "${API_URL}" \
    --broadcast "${API_URL}/testnet3/transaction/broadcast" \
    --priority-fee 100
  1. execute contract ( failed )
snarkos developer execute --private-key ${PRIVATE_KEY} \
    --query "${API_URL}" \
    --broadcast "${API_URL}/testnet3/transaction/broadcast" \
    --priority-fee 100 \
    "${APPNAME}.aleo" main 1u32 1u32

Your Environment

snarkOS Version: 2.2.7 Rust Version: 1.75.0 Release: https://github.com/AleoHQ/snarkOS/releases/download/v2.2.7/aleo-testnet1-v2.2.7-x86_64-unknown-linux-gnu.zip

lispking avatar Jan 21 '24 10:01 lispking