mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
srml-contract: introduce ext_caller external function (#1255)
* Implement ext_caller. * Rebuild wasm. * Update COMPLEIXTY.md
This commit is contained in:
committed by
Gav Wood
parent
c1b0fba486
commit
ce91da6b89
@@ -90,7 +90,7 @@ impl<'a, T: Trait> ExecutionContext<'a, T> {
|
||||
output_data,
|
||||
&mut CallContext {
|
||||
ctx: &mut nested,
|
||||
_caller: caller,
|
||||
caller: caller,
|
||||
},
|
||||
&self.config.schedule,
|
||||
gas_meter,
|
||||
@@ -158,7 +158,7 @@ impl<'a, T: Trait> ExecutionContext<'a, T> {
|
||||
&mut contract_code,
|
||||
&mut CallContext {
|
||||
ctx: &mut nested,
|
||||
_caller: caller,
|
||||
caller: caller,
|
||||
},
|
||||
&self.config.schedule,
|
||||
gas_meter,
|
||||
@@ -255,7 +255,7 @@ fn transfer<'a, T: Trait>(
|
||||
|
||||
struct CallContext<'a, 'b: 'a, T: Trait + 'b> {
|
||||
ctx: &'a mut ExecutionContext<'b, T>,
|
||||
_caller: T::AccountId,
|
||||
caller: T::AccountId,
|
||||
}
|
||||
|
||||
impl<'a, 'b: 'a, T: Trait + 'b> vm::Ext for CallContext<'a, 'b, T> {
|
||||
@@ -298,4 +298,8 @@ impl<'a, 'b: 'a, T: Trait + 'b> vm::Ext for CallContext<'a, 'b, T> {
|
||||
.map_err(|_| ())
|
||||
.map(|_| ())
|
||||
}
|
||||
|
||||
fn caller(&self) -> &T::AccountId {
|
||||
&self.caller
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user