#Invoking deployer contract function with constructor arguments

3 messages · Page 1 of 1 (latest)

cursive vector
#

Try this CLI command:

stellar contract invoke \
  --id CDKFYUNVJHAAEQJNQFPYDUY7MB3HK74VLHF7CUMG6NTWEQHFIPHQBG2T \
  --source alice \
  --network testnet \
  -- init \
  --admin SAJKSBRM76CHC66VE2U4PGDZKRUOQFNN3OJVB6W2PYTMHXLZ6A6NPNWY \
  --owner SAJKSBRM76CHC66VE2U4PGDZKRUOQFNN3OJVB6W2PYTMHXLZ6A6NPNWY
median night
# cursive vector Try this CLI command: ``` stellar contract invoke \ --id CDKFYUNVJHAAEQJNQFPYD...

init is unrecognised. No init function.
deploy function needs to be invoked with 3 arguments. One of them is constructor arg of contract A which has admin and owner address.

Document has an example which looks like:

    --deployer 
CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM
    --salt 123 \
    --wasm_hash 7792a624b562b3d9414792f5fb5d72f53b9838fef2ed9a901471253970bc3b15 \
    --constructor_args '[{"u32":5}]'
cursive vector
#

@median night Pardon, init function was just an example, it must be deploy. Could you share the code of your smart contract here?