youtube image
From YouTube: Casper Association | Writing On-Chain Code | 14. Calling Contracts with Session Arguments

Description

In this video, we will see how to call contracts using session arguments.

The Casper client put-deploy command allows you to do this with the --session-arg option.

Reference documentation:
https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/calling-contracts/#calling-contracts-with-session-args

Reference contract code:
https://github.com/casper-ecosystem/counter/tree/count_inc_with_args
The command used in this example to call a contract using arguments is:
casper-client put-deploy \
--node-address http://135.181.208.231:7777 \
--chain-name casper-test \
--secret-key /Users/iulia/KEYS/secret_key.pem \
--payment-amount 100000000 \
--session-hash hash-cc752f2cc0eb235dc17294b4368cbba3735a7ea5260ac45155473ea5971c1bef \
--session-entry-point "counter_inc" \
--session-arg "amount:i32='20'"