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

DRAFT: ULM Integration #64

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

DRAFT: ULM Integration #64

wants to merge 41 commits into from

Conversation

mariaKt
Copy link
Contributor

@mariaKt mariaKt commented Oct 22, 2024

This PR includes the following changes:

  • The contract storage cell has been changed to (a) use Int indices instead of Id and (b) store Int instead of Value. For mappings, the index computation uses a combination of hashing concatenation of the base's index and the keys. The semantics are changed accordingly. A new cell is used to store the Map between Id and Int index. This was tested separately on main branch.
  • State variable assignment and lookup using the ULM interface. Limited to the types found in UniswapV2Swap Mock contracts.
  • Function selector computation. Tested separately on main branch.
  • Configuration extraction for ULM: implementation of getGasLeft, getOutput, getStatus.
  • Configuration initialization using ULM: Solidity semantics with $CREATE=false, $CREATE=true.
  • Events emission using ULM Log* .
  • Removed cells representing blockchain state, and commented out rules not needed by Mock contracts: new contract, external call, create, txn.

Throughout, we have made the assumption that while $PGM may contain one or more contracts, but the active contract must be the last on the list.

I have locally checked that the branch compiles.

mariaKt and others added 3 commits November 7, 2024 15:11
* String encoding & test.

* Updated contracts: added name and symbol functions.

* Renamed according to review comments.

* Added comment.

* updated WETHMock token's name function

---------

Co-authored-by: Theodoros Kasampalis <[email protected]>
* Replace Swap call with transact

* Add an EVM-only script

* Re-added call to get transaction result, and wait for transaction.

---------

Co-authored-by: Maria Kotsifakou <[email protected]>
<current-function> Id </current-function>
<call-stack> .List </call-stack> // Stack of call frames
<status> EVMC_SUCCESS </status> // Status code to be returned
<gas> $GAS:Int </gas> // Available gass
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: gas

syntax Int ::= GetAccountStorage(key: Int)
syntax K ::= SetAccountStorage(key: Int, value: Int)
```
. They provide an Int as a key to the storage, as per the EVM memory model, and
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: extra . here

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.

3 participants