|
| 1 | +# Runtime Transactions |
| 2 | + |
| 3 | +This section describes the format of all supported runtime methods and queries |
| 4 | +with references to go, rust and typescript bindings in Oasis SDK. |
| 5 | + |
| 6 | +## Methods |
| 7 | + |
| 8 | +### accounts.Transfer [[go][go-accounts.Transfer]|[rust][rust-accounts.Transfer]|[typescript][ts-accounts.Transfer]] |
| 9 | + |
| 10 | +Parameters: [[rust][rust-params-accounts.Transfer]] |
| 11 | + |
| 12 | +[go-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 13 | +[rust-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L486-L528 |
| 14 | +[ts-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
| 15 | +[rust-params-accounts.Transfer]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L140-L149 |
| 16 | + |
| 17 | +### contracts.Call [[go][go-contracts.Call]|[rust][rust-contracts.Call]|[typescript][ts-contracts.Call]] |
| 18 | + |
| 19 | +Parameters: [rust][rust-params-contracts.Call] |
| 20 | + |
| 21 | +- `id: InstanceId` |
| 22 | + |
| 23 | + Instance identifier. |
| 24 | + |
| 25 | +- `data: Vec<u8>` |
| 26 | + |
| 27 | + Call arguments. |
| 28 | + |
| 29 | +- `tokens: Vec<token::BaseUnits>` |
| 30 | + |
| 31 | + Tokens that should be sent to the contract as part of the call. |
| 32 | + |
| 33 | +[go-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 34 | +[rust-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L486-L528 |
| 35 | +[ts-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
| 36 | +[rust-params-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L140-L149 |
| 37 | + |
| 38 | +### contracts.Instantiate [[go][go-contracts.Instantiate]|[rust][rust-contracts.Instantiate]|[typescript][ts-contracts.Instantiate]] |
| 39 | + |
| 40 | +Parameters: [[rust][rust-params-contracts.Instantiate]] |
| 41 | + |
| 42 | +- `code_id: CodeId` |
| 43 | + |
| 44 | + Identifier of code used by the instance. |
| 45 | + |
| 46 | +- `upgrades_policy: Policy` |
| 47 | + |
| 48 | + Who is allowed to upgrade this instance. |
| 49 | + |
| 50 | +- `data: Vec<u8>` |
| 51 | + |
| 52 | + Arguments to contract's instantiation function. |
| 53 | + |
| 54 | +- `tokens: Vec<token::BaseUnits>` |
| 55 | + |
| 56 | + Tokens that should be sent to the contract as part of the instantiate call. |
| 57 | + |
| 58 | +[go-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 59 | +[rust-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L424-L483 |
| 60 | +[ts-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
| 61 | +[rust-params-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L115-L129 |
| 62 | + |
| 63 | +### contracts.Upgrade [[go][go-contracts.Upgrade]|[rust][rust-contracts.Upgrade]|[typescript][ts-contracts.Upgrade]] |
| 64 | + |
| 65 | +Parameters: [[rust][rust-params-contracts.Upgrade]] |
| 66 | + |
| 67 | +- `id: InstanceId` |
| 68 | + |
| 69 | + Instance identifier. |
| 70 | + |
| 71 | +- `code_id: CodeId` |
| 72 | + |
| 73 | + Updated code identifier. |
| 74 | + |
| 75 | +- `data: Vec<u8>` |
| 76 | + |
| 77 | + Arguments to contract's upgrade function. |
| 78 | + |
| 79 | +- `tokens: Vec<token::BaseUnits>` |
| 80 | + |
| 81 | + Tokens that should be sent to the contract as part of the call. |
| 82 | + |
| 83 | +[go-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 84 | +[rust-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L531-L597 |
| 85 | +[ts-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
| 86 | +[rust-params-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L156-L170 |
| 87 | + |
| 88 | +### contracts.Upload [[go][go-contracts.Upload]|[rust][rust-contracts.Upload]|[typescript][ts-contracts.Upload]] |
| 89 | + |
| 90 | +Parameters: [[rust][rust-params-contracts.Upload]] |
| 91 | + |
| 92 | +- `abi: ABI` |
| 93 | + |
| 94 | + ABI |
| 95 | + |
| 96 | +- `instantiate_policy: Policy` |
| 97 | + |
| 98 | + Who is allowed to instantiate this code. |
| 99 | + |
| 100 | +- `code: Vec<u8>` |
| 101 | + |
| 102 | + Compiled contract code. |
| 103 | + |
| 104 | +[go-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 105 | +[rust-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L332-L421 |
| 106 | +[ts-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
| 107 | +[rust-params-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/types.rs#L95-L106 |
| 108 | + |
| 109 | +### evm.Call [[go]|[rust]|[typescript]] |
| 110 | + |
| 111 | +### evm.Create [[go]|[rust]|[typescript]] |
| 112 | + |
| 113 | +### consensus.Deposit [[go]|[rust]|[typescript]] |
| 114 | + |
| 115 | +### consensus.Withdraw [[go]|[rust]|[typescript]] |
| 116 | + |
| 117 | +## Queries |
| 118 | + |
| 119 | +### accounts.Addresses [[go]|[rust]|[typescript]] |
| 120 | + |
| 121 | +### consensus.Balance [[go]|[rust]|[typescript]] |
| 122 | + |
| 123 | +### accounts.Balances [[go]|[rust]|[typescript]] |
| 124 | + |
| 125 | +### accounts.DenominationInfo [[go]|[rust]|[typescript]] |
| 126 | + |
| 127 | +### accounts.Nonce [[go]|[rust]|[typescript]] |
| 128 | + |
| 129 | +### contracts.Code [[go]|[rust]|[typescript]] |
| 130 | + |
| 131 | +### contracts.Custom [[go]|[rust]|[typescript]] |
| 132 | + |
| 133 | +### contracts.Instance [[go]|[rust]|[typescript]] |
| 134 | + |
| 135 | +### contracts.InstanceStorage [[go]|[rust]|[typescript]] |
| 136 | + |
| 137 | +### contracts.PublicKey [[go]|[rust]|[typescript]] |
| 138 | + |
| 139 | +### consensus.Account [[go]|[rust]|[typescript]] |
| 140 | + |
| 141 | +### core.EstimateGas [[go]|[rust]|[typescript]] |
| 142 | + |
| 143 | +### core.CallDataPublicKey [[go]|[rust]|[typescript]] |
| 144 | + |
| 145 | +### core.CheckInvariants [[go]|[rust]|[typescript]] |
| 146 | + |
| 147 | +### core.MinGasPrice [[go]|[rust]|[typescript]] |
| 148 | + |
| 149 | +### core.RuntimeInfo [[go]|[rust]|[typescript]] |
| 150 | + |
| 151 | +### evm.Balance [[go]|[rust]|[typescript]] |
| 152 | + |
| 153 | +### evm.Code [[go]|[rust]|[typescript]] |
| 154 | + |
| 155 | +### evm.SimulateCall [[go]|[rust]|[typescript]] |
| 156 | + |
| 157 | +### evm.Storage [[go]|[rust]|[typescript]] |
| 158 | + |
| 159 | +[go]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/go/modules/contracts/contracts.go#L112-L118 |
| 160 | +[rust]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/runtime-sdk/modules/contracts/src/lib.rs#L600-L605 |
| 161 | +[typescript]: https://github.com/oasisprotocol/oasis-sdk/blob/656b0a21527149c690c3daf3ce25becea6e9bad3/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 |
0 commit comments