Last active
August 25, 2016 02:53
-
-
Save axic/472c1a279e9a200104e3a852af23103e to your computer and use it in GitHub Desktop.
Standard eWASM deployer code.
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
;; | |
;; Standard eWASM deployer code. | |
;; | |
;; We keep the to-be-deployed contract as a memory segment and simply return it. | |
;; | |
(module | |
(memory 1 | |
(segment 0 "\10\00\00\00") ;; Here comes the size of the code in LSB | |
(segment 4 "Hello World CODE") ;; Here comes the code as a escaped hex string | |
) | |
(export "memory" memory) | |
(export "main" $main) | |
(import $ethereum_return "ethereum" "return" (param i32 i32)) | |
(func $main | |
(call_import $ethereum_return (i32.const 4) (i32.load (i32.const 0))) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment