Skip to content

Commit

Permalink
Trying to get the right way to encode complex params
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymcmackin committed Dec 15, 2023
1 parent e741117 commit 4ab4193
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/unity/managing-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,23 @@ TezosManager.Instance.Tezos.Wallet.CallContract(
);
```

This example passes the value 12 to the entrypoint in the variable `entryPointName`.
If the entrypoint requires a parameter that is more complex than a single value, you must encode it as described in [Encoding parameters](#encoding-parameters).

To get the hash of the transaction, use the `ContractCallCompleted` event.

## Encoding parameters

When you call contract entrypoints or views with `Wallet.CallContract()`, you must encode the parameter as a Micheline value.
For example, if an entrypoint accepts four integers as parameters, you must pass a list of `Netezos.Encoding.MichelineInt` values:

TODO can't get this to work with various values.

```csharp

```


<!-- TODO:
- Can you deploy a contract for each user?
- Managing multiple contracts?
Expand Down

0 comments on commit 4ab4193

Please sign in to comment.