-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# Runtime Transactions | ||
|
||
This section describes the format of all supported runtime methods and queries | ||
with references to go, rust and typescript bindings in Oasis SDK. | ||
|
||
## Methods | ||
|
||
### accounts.Transfer [[Go][go-accounts.Transfer]|[Rust][rust-accounts.Transfer]|[TypeScript][ts-accounts.Transfer]] | ||
|
||
Parameters: [[Rust][rust-params-accounts.Transfer]] | ||
|
||
[go-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[rust-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L486-L528 | ||
[ts-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 | ||
[rust-params-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L140-L149 | ||
|
||
### contracts.Call [[Go][go-contracts.Call]|[Rust][rust-contracts.Call]|[TypeScript][ts-contracts.Call]] | ||
|
||
Parameters: [[Rust][rust-params-contracts.Call]] | ||
|
||
- `id: InstanceId` | ||
|
||
Instance identifier. | ||
|
||
- `data: Vec<u8>` | ||
|
||
Call arguments. | ||
|
||
- `tokens: Vec<token::BaseUnits>` | ||
|
||
Tokens that should be sent to the contract as part of the call. | ||
|
||
[go-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[rust-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L486-L528 | ||
[ts-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 | ||
[rust-params-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L140-L149 | ||
|
||
### contracts.Instantiate [[Go][go-contracts.Instantiate]|[Rust][rust-contracts.Instantiate]|[TypeScript][ts-contracts.Instantiate]] | ||
|
||
Parameters: [[Rust][rust-params-contracts.Instantiate]] | ||
|
||
- `code_id: CodeId` | ||
|
||
Identifier of code used by the instance. | ||
|
||
- `upgrades_policy: Policy` | ||
|
||
Who is allowed to upgrade this instance. | ||
|
||
- `data: Vec<u8>` | ||
|
||
Arguments to contract's instantiation function. | ||
|
||
- `tokens: Vec<token::BaseUnits>` | ||
|
||
Tokens that should be sent to the contract as part of the instantiate call. | ||
|
||
[go-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[rust-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L424-L483 | ||
[ts-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 | ||
[rust-params-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L115-L129 | ||
|
||
### contracts.Upgrade [[Go][go-contracts.Upgrade]|[Rust][rust-contracts.Upgrade]|[TypeScript][ts-contracts.Upgrade]] | ||
|
||
Parameters: [[Rust][rust-params-contracts.Upgrade]] | ||
|
||
- `id: InstanceId` | ||
|
||
Instance identifier. | ||
|
||
- `code_id: CodeId` | ||
|
||
Updated code identifier. | ||
|
||
- `data: Vec<u8>` | ||
|
||
Arguments to contract's upgrade function. | ||
|
||
- `tokens: Vec<token::BaseUnits>` | ||
|
||
Tokens that should be sent to the contract as part of the call. | ||
|
||
[go-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[rust-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L531-L597 | ||
[ts-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 | ||
[rust-params-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L156-L170 | ||
|
||
### contracts.Upload [[Go][go-contracts.Upload]|[Rust][rust-contracts.Upload]|[TypeScript][ts-contracts.Upload]] | ||
|
||
Parameters: [[Rust][rust-params-contracts.Upload]] | ||
|
||
- `abi: ABI` | ||
|
||
ABI | ||
|
||
- `instantiate_policy: Policy` | ||
|
||
Who is allowed to instantiate this code. | ||
|
||
- `code: Vec<u8>` | ||
|
||
Compiled contract code. | ||
|
||
[go-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[rust-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L332-L421 | ||
[ts-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 | ||
[rust-params-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L95-L106 | ||
|
||
### evm.Call [[Go]|[Rust]|[TypeScript]] | ||
|
||
### evm.Create [[Go]|[Rust]|[TypeScript]] | ||
|
||
### consensus.Deposit [[Go]|[Rust]|[TypeScript]] | ||
|
||
### consensus.Withdraw [[Go]|[Rust]|[TypeScript]] | ||
|
||
## Queries | ||
|
||
### accounts.Addresses [[Go]|[Rust]|[TypeScript]] | ||
|
||
### consensus.Balance [[Go]|[Rust]|[TypeScript]] | ||
|
||
### accounts.Balances [[Go]|[Rust]|[TypeScript]] | ||
|
||
### accounts.DenominationInfo [[Go]|[Rust]|[TypeScript]] | ||
|
||
### accounts.Nonce [[Go]|[Rust]|[TypeScript]] | ||
|
||
### contracts.Code [[Go]|[Rust]|[TypeScript]] | ||
|
||
### contracts.Custom [[Go]|[Rust]|[TypeScript]] | ||
|
||
### contracts.Instance [[Go]|[Rust]|[TypeScript]] | ||
|
||
### contracts.InstanceStorage [[Go]|[Rust]|[TypeScript]] | ||
|
||
### contracts.PublicKey [[Go]|[Rust]|[TypeScript]] | ||
|
||
### consensus.Account [[Go]|[Rust]|[TypeScript]] | ||
|
||
### core.EstimateGas [[Go]|[Rust]|[TypeScript]] | ||
|
||
### core.CallDataPublicKey [[Go]|[Rust]|[TypeScript]] | ||
|
||
### core.CheckInvariants [[Go]|[Rust]|[TypeScript]] | ||
|
||
### core.MinGasPrice [[Go]|[Rust]|[TypeScript]] | ||
|
||
### core.RuntimeInfo [[Go]|[Rust]|[TypeScript]] | ||
|
||
### evm.Balance [[Go]|[Rust]|[TypeScript]] | ||
|
||
### evm.Code [[Go]|[Rust]|[TypeScript]] | ||
|
||
### evm.SimulateCall [[Go]|[Rust]|[TypeScript]] | ||
|
||
### evm.Storage [[Go]|[Rust]|[TypeScript]] | ||
|
||
[Go]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 | ||
[Rust]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L600-L605 | ||
[TypeScript]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |