Application call
Interact with a decentralised application: store a value on the blockchain.
We have set up a really simple stateful smart contract to test the application calls. This smart contract is expecting an integer as a parameter. It then stores the sum of values and the number of values as global states within the application and the last value sent as a local state in the user account.

Once you've put some money into your account, you can run the Unix example program with the -a
flag:
$ ./examples/unix/unix_example -a
๐ข [examples/unix/main.c:245] ๐ Vertices SDK running on Unix-based OS
๐ข [examples/unix/main.c:140] ๐ Loading private key from: /Users/cyril/Documents/work/vertices/c-vertices-sdk/examples/unix/config/private_key.bin
๐ข [examples/unix/main.c:201] ๐ณ Alice's account E3PGTXKDOODVQ3E2ZB5PMJF2W3YOKIPUPLFDTESSP6562QE4GTLAKO4VXY
๐ข [examples/unix/main.c:278] ๐ Running on testnet-v1.0 v.2.6.0
๐ข [src/account.c:42] ๐ Added account to wallet: #0
๐ข [src/account.c:42] ๐ Added account to wallet: #1
๐ข [examples/unix/main.c:293] ๐ค 2.907842 Algos on Alice's account (E3PGTXKDOODVQ3E2ZB5PMJF2W3YOKIPUPLFDTESSP6562QE4GTLAKO4VXY)
๐ข [src/algorand/algorand_transaction.c:435] ๐งพ Transaction executed, ID: WEXZJNY4UIVTZLYP2DXMZZTA5FMEEOLCQCVM6J66DZDCAW6YJWZQ
๐ข [src/account.c:104] ๐ Deleted account from wallet: #0
๐ข [src/account.c:104] ๐ Deleted account from wallet: #1
Now you can check the transaction status on AlgoExplorer for Testnet, using the transaction ID printed WEXZJNY4UIVTZLYP2DXMZZTA5FMEEOLCQCVM6J66DZDCAW6YJWZQ
.
Here is the status of the transaction:

Opt-In
If the account calling the smart contract never opted in the application, it will be automatically done.
Last updated
Was this helpful?