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
Back to post

Revisions 3

one year ago
Does anyone knows how to hardcode an address in smart contract?
Does anyone knows how to hardcode an address in smart contract?
The contract address is a hash of the code's `**stateInit**`. If you change the initial storage of the contract, you are changing the future address of the contract. However, the future contract address is deterministic (known before you deploy), so you can pass the address to the storage, as part of the initializations of the contract. For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address: ```solidity contract Example { any_int: Int; init() { self.any_int = 0; } receive("A") { let contractInit: StateInit = initOf TargetContract(self.any_int, 666); send(SendParameters{ to: contractAddress(contractInit), value: 0, mode: 0 + 64 + 128, bounce: false }); } } contract TargetContract { counter: Int; balance: Int; init(input_counter: Int, input_balance: Int){ self.counter = input_counter; self.balance = input_balance; } receive(){ // empty, means do nothing when receive empty body message. } } ``` As you can see, we can change the parameters that the second contract needs to predetermine the contract address since we got the `stateInit` code.
The contract address is a hash of the `**stateInit**` the code. If you change the initial sotrage of the contract , you are changing the future address of the contract, but contract address is deterministic ( and its knowen before you deploy) you can pass the address to the sotrage , as part of the initializations of the contract. For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address: ``` contract Example { any_int: Int; init() { self.any_int = 0; } receive("A") { let contractInit: StateInit = initOf TargetContract(self.any_int, 666); send(SendParameters{ to: contractAddress(contractInit), value: 0, mode: 0 + 64 + 128, bounce: false }); } } contract TargetContract { counter: Int; balance: Int; init(input_counter: Int, input_balance: Int){ self.counter = input_counter; self.balance = input_balance; } receive(){ // empty, means do nothing when receive empty body message. } } ``` As you can see, we can change the parameters that the second contract need to predetemine the contract address since we got the `stateInit` code.
one year ago
Does anyone knows how to hardcode an address in smart contract?
Does anyone knows how to hardcode an address in smart contract?
The contract address is a hash of the `**stateInit**` the code. If you change the initial sotrage of the contract , you are changing the future address of the contract, but contract address is deterministic ( and its knowen before you deploy) you can pass the address to the sotrage , as part of the initializations of the contract. For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address: ``` contract Example { any_int: Int; init() { self.any_int = 0; } receive("A") { let contractInit: StateInit = initOf TargetContract(self.any_int, 666); send(SendParameters{ to: contractAddress(contractInit), value: 0, mode: 0 + 64 + 128, bounce: false }); } } contract TargetContract { counter: Int; balance: Int; init(input_counter: Int, input_balance: Int){ self.counter = input_counter; self.balance = input_balance; } receive(){ // empty, means do nothing when receive empty body message. } } ``` As you can see, we can change the parameters that the second contract need to predetemine the contract address since we got the `stateInit` code.
The contract address is a hash of the `**stateInit**` the code. If you change the initial sotrage of the contract , you are changing the future address of the contract, but contract address is deterministic ( and its knowen before you deploy) you can pass the address to the sotrage , as part of the initializations of the contract. For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address: ![123](https://i.postimg.cc/kGLB7txR/Screen-Shot-2023-02-05-at-20-53-11.png) As you can see, we can change the parameters that the second contract need to predetemine the contract address since we got the `stateInit` code.
one year ago
Original
Does anyone knows how to hardcode an address in smart contract?

The contract address is a hash of the `**stateInit**` the code. If you change the initial sotrage of the contract , you are changing the future address of the contract, but contract address is deterministic ( and its knowen before you deploy) you can pass the address to the sotrage , as part of the initializations of the contract. For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address: ![123](https://i.postimg.cc/kGLB7txR/Screen-Shot-2023-02-05-at-20-53-11.png) As you can see, we can change the parameters that the second contract need to predetemine the contract address since we got the `stateInit` code.