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

Mx blockchain hooks #67

Merged
merged 3 commits into from
Aug 29, 2024
Merged

Mx blockchain hooks #67

merged 3 commits into from
Aug 29, 2024

Conversation

virgil-serbanuta
Copy link
Member

Needs #66
Closes #48

@virgil-serbanuta virgil-serbanuta marked this pull request as ready for review August 28, 2024 19:47
configuration
<mx-blocks>
<mx-current-block>
<mx-current-block-timestamp> 0 </mx-current-block-timestamp>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Right now my understanding is that our timing information is arbitrary, as we do not compute time at the moment, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's correct. However, we need to be able to simulate time for the lending contract, which uses self.blockchain().get_block_timestamp(). Arguably, maybe I shouldn't have implemented this hook now since our priority is the swap contract, but it was quite easy, so whatever.

@virgil-serbanuta virgil-serbanuta merged commit 0073e26 into main Aug 29, 2024
1 check passed
@virgil-serbanuta virgil-serbanuta deleted the mx-blockchain branch August 29, 2024 20:12
ACassimiro added a commit that referenced this pull request Aug 30, 2024
* Mx BigUint hooks (#66)

* Framework for Mx tests

* BigUint operations - new+add

* bigIntSub hook

* Add bigIntMul hook

* Add a bigIntDiv hook

* BigInt comparison

---------

Co-authored-by: Virgil Serbanuta <Virgil Serbanuta>

* Mx blockchain hooks (#67)

* MX getCaller hook

* Mx get-sc-balance hook

* MX getBlockTimestamp hook

---------

Co-authored-by: Virgil <[email protected]>
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.

Mx semantics - Hooks - Blockchain - Rust + Mx
2 participants