mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
contracts: Add RPC that allows instantiating of a contract (#8451)
* contracts: Add RPC that allows instantiating of a contract * Encode `debug_message` as bytes because usage of `String` is forbidden * Remove erroneous derive attribute * Fix rpc tests for new `debug_message` encoding * Fix typo Co-authored-by: Andrew Jones <ascjones@gmail.com> Co-authored-by: Andrew Jones <ascjones@gmail.com>
This commit is contained in:
committed by
GitHub
parent
24311eee3e
commit
f854194139
@@ -1340,7 +1340,9 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>
|
||||
impl pallet_contracts_rpc_runtime_api::ContractsApi<
|
||||
Block, AccountId, Balance, BlockNumber, Hash,
|
||||
>
|
||||
for Runtime
|
||||
{
|
||||
fn call(
|
||||
@@ -1353,6 +1355,18 @@ impl_runtime_apis! {
|
||||
Contracts::bare_call(origin, dest, value, gas_limit, input_data)
|
||||
}
|
||||
|
||||
fn instantiate(
|
||||
origin: AccountId,
|
||||
endowment: Balance,
|
||||
gas_limit: u64,
|
||||
code: pallet_contracts_primitives::Code<Hash>,
|
||||
data: Vec<u8>,
|
||||
salt: Vec<u8>,
|
||||
) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, BlockNumber>
|
||||
{
|
||||
Contracts::bare_instantiate(origin, endowment, gas_limit, code, data, salt, true)
|
||||
}
|
||||
|
||||
fn get_storage(
|
||||
address: AccountId,
|
||||
key: [u8; 32],
|
||||
|
||||
Reference in New Issue
Block a user