Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
ink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
parity
ink
Commits
1d9bb5f1
Commit
1d9bb5f1
authored
Feb 17, 2019
by
Hero Bird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pdsl_model] Implement proper ContractInstance::call
parent
986bf5c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
model/src/contract.rs
model/src/contract.rs
+11
-10
No files found.
model/src/contract.rs
View file @
1d9bb5f1
...
...
@@ -302,15 +302,16 @@ where
// action after instantiation.
//
// Internally calls the associated call<Msg>.
unimplemented!
()
}
}
impl
<
State
,
DeployArgs
,
HandlerChain
>
ContractInstance
<
State
,
DeployArgs
,
HandlerChain
>
{
fn
call
<
Msg
>
(
self
,
_
args
:
<
Msg
as
Message
>
::
Input
)
where
Msg
:
Message
,
{
unimplemented!
()
use
pdsl_core
::
env
::
Env
;
use
parity_codec
::
Decode
;
let
input
=
pdsl_core
::
env
::
ContractEnv
::
input
();
let
call_data
=
crate
::
CallData
::
decode
(
&
mut
&
input
[
..
])
.unwrap
();
let
mut
this
=
self
;
this
.handlers
.handle_call
(
&
mut
this
.env
,
call_data
)
.ok
()
.expect
(
"trapped during message dispatch"
);
this
.env.state
.flush
()
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment