-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: add client entity to smart contracts #5073
base: main
Are you sure you want to change the base?
Conversation
c27b520
to
b1328d9
Compare
b1328d9
to
497159e
Compare
497159e
to
0d245fc
Compare
let account_id = args.account.id().clone(); | ||
|
||
Register::account(args.account) | ||
.execute() | ||
host.submit(&Register::account(args.account)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the unfortunate difference from iroha
client is that we take instruction by reference instead of value
@@ -15,17 +15,18 @@ static ALLOC: GlobalDlmalloc = GlobalDlmalloc; | |||
|
|||
getrandom::register_custom_getrandom!(iroha_executor::stub_getrandom); | |||
|
|||
#[derive(Constructor, ValidateEntrypoints, Validate, Visit)] | |||
#[derive(Constructor, Visit, Execute, Entrypoints)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO carries too much mental overhead for the end user. Can we simplify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they always used together we can combine them.
7e6885c
to
8cec7c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since this is breaking change for smart-contracts, migration guide should be provided.
@@ -15,17 +15,18 @@ static ALLOC: GlobalDlmalloc = GlobalDlmalloc; | |||
|
|||
getrandom::register_custom_getrandom!(iroha_executor::stub_getrandom); | |||
|
|||
#[derive(Constructor, ValidateEntrypoints, Validate, Visit)] | |||
#[derive(Constructor, Visit, Execute, Entrypoints)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they always used together we can combine them.
8cec7c0
to
3833fb0
Compare
c86c808
to
1cc3747
Compare
Signed-off-by: Marin Veršić <[email protected]>
1cc3747
to
6a44ed1
Compare
Context
(host, context)
Validate
trait toExecute
Closes #4898
Migration guide
Previous API:
New API: