| Type | Sophia | JS | |------|--------|----| | int | ` add_two(one: int, two: int)` | `contractObject.methods.sum(1 , 2)` | | address | ` set_owner(owner: address)` | `contractObject.methods.set_owner("ak_1337...")` | | bool | `is_it_true(answer : bool)` | `contractObject.methods.is_it_true(true)` | | bits | `give_me_bits(input : bits)` | ? | | bytes | `get_bytes(test : bytes(3))` | `contractObject.methods.get_bytes(["0x01","0x1f", "0x10"])` | | string | `hello_world(say_hello : string)` | `contractObject.methods.hello_world("Hello!")` | | list | `have_a_few(candy : list(string))` | `contractObject.methods.have_a_few(["Skittles", "M&Ms", "JellyBelly"])` | | functions | (Higher order) functions are not allowed in`entrypoint`s | | | tuple | `a_few_things(things : (string * int * map(address, bool)))` | `contractObject.methods.a_few_things["hola", 3, {"ak_1337...": true}])` | | record | record user = {<br /> name: string, <br /> surname: string <br />. } | | | | | | | | | | | | | | | | | |
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up