Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Does anyone know or have an example on how can I store a static address in FunC assembly?

Does anyone know or have an example how can I store a static address in FunC? I'm thinking about using the asm command, but I'm not sure what the syntax is for a const slice

int gas_consumption() asm "10000000 PUSHINT";

Maybe it would be something like:

slice myaddr() asm "Ef8E9kxq-_890Q2LpnB3kKyWcNVA83qUSLAze6pqWpKsrB5K' $>smca 2drop Addr"; 

Is this possible?


This question was imported from Telegram Chat: https://t.me/tondev_eng/3550

Votes Newest

Answers


You can using something like:

const a = "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"a

You need to create a function which returns a splice. Something like this

slice fun_name() asm “x{0055bb} PUSHSLICE”

and then execute a function when you need a slice:

.store_slice(fun_name())

For more information, can check here
https://ton.org/docs/develop/func/literals_identifiers

1
1
Posted one year ago
Edited one year ago
16K Views
1 Answer
one year ago
one year ago
Tags