Skip to content
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

Feature/native token #52

Merged
merged 23 commits into from
Oct 17, 2022
Merged

Feature/native token #52

merged 23 commits into from
Oct 17, 2022

Conversation

kpob
Copy link
Contributor

@kpob kpob commented Oct 12, 2022

See #36

@kpob kpob marked this pull request as draft October 12, 2022 14:25
core/src/contract_def.rs Show resolved Hide resolved
},
syn::ReturnType::Type(_, _) => quote! {
use odra::types::CLTyped;
#args
odra::call_contract(&self.address, #entrypoint_name, &args)
odra::call_contract(&self.address, #entrypoint_name, &args, self.attached_value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you set self.attached_value to None after those call_contract calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I should, good catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the thing is, it implies all the functions must be mutable. If so, a user has to define a contract ref as mutable but is not too intuitive.

lang/codegen/src/generator/module_impl/reference.rs Outdated Show resolved Hide resolved
lang/ir/src/attrs.rs Outdated Show resolved Hide resolved
lang/ir/src/attrs.rs Outdated Show resolved Hide resolved
lang/ir/src/module_item/constructor.rs Outdated Show resolved Hide resolved
lang/ir/src/module_item/utils.rs Outdated Show resolved Hide resolved
lang/ir/src/module_item/utils.rs Outdated Show resolved Hide resolved
mock_vm/src/mock_vm.rs Outdated Show resolved Hide resolved
* move balances to storage
* revert balances along with state
* remove Account struct
* add Balance struct
* add Callstack and CallstackElement
* Remove Contract struct
@kpob kpob marked this pull request as ready for review October 14, 2022 09:06
@kpob kpob merged commit e6429cf into 0.2.0 Oct 17, 2022
@kpob kpob deleted the feature/native_token branch November 9, 2022 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants