-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into multiencoded-cev
- Loading branch information
Showing
12 changed files
with
238 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
```k | ||
module MX-RUST-MODULES-BLOCKCHAIN | ||
imports private COMMON-K-CELL | ||
imports private MX-COMMON-SYNTAX | ||
imports private MX-RUST-REPRESENTATION | ||
imports private MX-RUST-REPRESENTATION-CONVERSIONS | ||
imports private RUST-EXECUTION-CONFIGURATION | ||
imports private RUST-SHARED-SYNTAX | ||
syntax Identifier ::= "MxRust#Blockchain" [token] | ||
syntax MxRustStructType ::= "blockchainType" [function, total] | ||
rule blockchainType | ||
=> rustStructType | ||
( MxRust#Blockchain | ||
, .MxRustStructFields | ||
) | ||
rule | ||
normalizedMethodCall | ||
( MxRust#Blockchain | ||
, #token("new", "Identifier"):Identifier | ||
, .PtrList | ||
) | ||
=> mxRustNewStruct | ||
( blockchainType | ||
, .CallParamsList | ||
) | ||
rule | ||
normalizedMethodCall | ||
( MxRust#Blockchain | ||
, #token("get_caller", "Identifier"):Identifier | ||
, ( ptr(_SelfId:Int) | ||
, .PtrList | ||
) | ||
) | ||
=> MX#getCaller ( .MxValueList ) | ||
~> mxValueToRust(#token("ManagedAddress", "Identifier"):Identifier) | ||
rule | ||
normalizedMethodCall | ||
( MxRust#Blockchain | ||
, #token("get_block_timestamp", "Identifier"):Identifier | ||
, ( ptr(_SelfId:Int) | ||
, .PtrList | ||
) | ||
) | ||
=> MX#getBlockTimestamp ( .MxValueList ) | ||
~> mxValueToRust(u64) | ||
endmodule | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.