4 Nov 2022
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'"
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'"
- 1 participant
- 3 minutes

4 Nov 2022
In this video, we discuss session code, which is the simplest piece of logic you can execute on a Casper network.
It requires only one entry point, the call function, and it runs within the context of the account executing the session code.
o Sample session code that configures an account on a Casper network to require two-party multi-signature deploys: https://github.com/casper-ecosystem/two-party-multi-sig/
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/session-code/
It requires only one entry point, the call function, and it runs within the context of the account executing the session code.
o Sample session code that configures an account on a Casper network to require two-party multi-signature deploys: https://github.com/casper-ecosystem/two-party-multi-sig/
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/session-code/
- 1 participant
- 3 minutes

4 Nov 2022
As part of the Casper Rust development environment, we provide a testing framework.
This video describes testing session code using the Casper testing framework without running a full node.
o Sample session code and tests: https://github.com/casper-ecosystem/two-party-multi-sig/
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/testing-session-code/
This video describes testing session code using the Casper testing framework without running a full node.
o Sample session code and tests: https://github.com/casper-ecosystem/two-party-multi-sig/
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/testing-session-code/
- 1 participant
- 2 minutes

4 Nov 2022
In this video, we introduce a simple smart contract that we install on the Casper Testnet.
To follow along, you can clone the repository of this simple contract that maintains a counter variable.
o Sample contract code: https://github.com/casper-ecosystem/counter
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/rust/
To follow along, you can clone the repository of this simple contract that maintains a counter variable.
o Sample contract code: https://github.com/casper-ecosystem/counter
o Reference documentation: https://docs.casperlabs.io/dapp-dev-guide/writing-contracts/rust/
- 1 participant
- 6 minutes
