Basic special only solidity and ursus functions, respectively
Here is a mapping of functions from solidity and a phased construction of functions in ursus, where
Soldity | Function | Notation to use |
---|---|---|
msg.sender | msg_sender (*0 0*) | msg->sender |
msg.value | msg_value (*0 0*) | msg->value |
msg.currencies | | |
msg.pubkey | msg_pubkey (*0 0*) | msg->pubkey () |
msg.isInternal | | |
msg.isExternal | | |
msg.isTickTock | | |
msg.createdAt | | |
msg.data | msg_data (*0 0*) | msg->data |
msg.hasStateInit | | |
<address>.makeAddrStd() | | |
<address>.makeAddrNone() | | |
<address>.makeAddrExtern() | | |
<address>.wid | addr_std_ι_workchain_id_right (*0 1*) | a ->wid |
<address>.wid | addr_std_ι_workchain_id_left (*0 1*) | a ->wid |
<address>.value | value (*0 1*) | a ->value |
<address>.value | addr_std_ι_address_left (*1 0*) | a ->value |
address(this).balance | balance (*0 0*) | address(this) |
<address>.balance | | |
<address>.currencies | | |
<address>.getType() | | |
<address>.isStdZero() | address_isStdZero (*0 1*) | x -> isStdZero () |
<address>.isStdAddrWithoutAnyCast() | | |
<address>.isExternZero() | | |
<address>.isNone() | | |
<address>.unpack() | | |
<address>.transfer() | tvm_transfer_left (*0 6*) | tvm->transfer( x , y , z , t , d , s ) |
tvm.accept() | tvm_accept_left (* 0 0*) | tvm->accept() |
tvm.setGasLimit() | | |
tvm.commit() | tvm_commit_left (*0 0*) | tvm->commit() |
tvm.rawCommit() | | |
tvm.getData() | | |
tvm.setData() | | |
tvm.log() | | |
tvm.hexdump() and tvm.bindump() | | |
tvm.setcode() | tvm_setCode_left (*0 1*) | tvm->setcode( x ) |
tvm.configParam() | | |
tvm.rawConfigParam() | | |
tvm.rawReserve() | tvm_rawReserve_left (*0 2*) | tvm->rawReserve( x , f ) |
tvm.hash() | tvm_hash (*0 1*) | tvm ->hash( x ) |
tvm.checkSign() | | |
tvm.insertPubkey() | | |
tvm.buildStateInit() | tvm_buildStateInit_right (*0 3*) | tvm->buildStateInit ( x , y , z ) |
tvm.buildStateInit() | tvm_buildStateInit'_right (*0 2*) | tvm->buildStateInit ( x , y ) |
tvm.buildDataInit() | tvm_buildDataInit_right (*0 1*) | tvm->buildDataInit( x ) |
tvm.stateInitHash() | tvm_stateInitHash (*0 4*) | tvm->stateInitHash( x , y , z , u ) |
tvm.code() | tvm_code (*0 0*) | tvm->code() |
tvm.codeSalt() | | |
tvm.setCodeSalt() | | |
tvm.pubkey() | tvm_pubkey (*0 0*) | tvm->pubkey () |
tvm.setPubkey() | | |
tvm.setCurrentCode() | tvm_setCurrentCode_left (*0 1*) | tvm->setCurrentCode ( x ) |
tvm.resetStorage() | tvm_resetStorage_left (*0 0*) | tvm->resetStorage () |
tvm.functionId() | | |
tvm.encodeBody() | | |
tvm.exit() and tvm.exit1() | tvm_exit_left (*0 0*) | tvm->exit() |
tvm.buildExtMsg() | | |
tvm.buildIntMsg() | | |
tvm.sendrawmsg() | | |
<TvmCell>.depth() | depth_right (*cell_depth*) (*0 1*) | x ->depth() |
<TvmCell>.dataSize() | | |
<TvmCell>.dataSizeQ() | dataSizeQ_right (*0 2*) | c->dataSizeQ( n ) |
<TvmCell>.toSlice() | to_slice_right (*0 1*) | c ->toSlice() |
<TvmSlice>.empty() | slice_empty_right (*0 1*) | c ->empty(n) |
<TvmSlice>.size() | size_right (*0 1*) | c->size() |
<TvmSlice>.bits() | bits_right (*0 0*) | c ->bits() |
<TvmSlice>.refs() | slice_refs | x ->refs () |
<TvmSlice>.dataSize() | | |
<TvmSlice>.dataSizeQ() | dataSizeQ_right (*0 2*) | c->dataSizeQ( n ) |
<TvmSlice>.depth() | slice_depth | x ->sliceDepth () |
<TvmSlice>.hasNBits() | slice_hasNBits_right (*0 2*) | c ->hasNBits(n) |
<TvmSlice>.hasNRefs() | slice_hasNRefs_right (*0 2*) | c ->hasNRefs(n) |
<TvmSlice>.hasNBitsAndRefs() | slice_hasNBitsAndRefs_right(*0 3*) | c->hasNBitsAndRefs(b, r) |
<TvmSlice>.compare() | | |
<TvmSlice>.decode() | slice_decode_right (prod A .. (prod B C) ..) (*1 0*) (*many args is one tuple*) | c->decode( A , .. , B , C ) |
<TvmSlice>.loadRef() | slice_loadRef_left (*1 0*) | c ->loadRef() |
<TvmSlice>.loadRef() | slice_loadRef_right (*0 1*) | c ->loadRef() |
<TvmSlice>.loadRefAsSlice() | slice_loadRefAsSlice_right (*1 0*) | c -> loadRefAsSlice() |
<TvmSlice>.loadRefAsSlice() | slice_loadRefAsSlice_left (*0 1*) | c -> loadRefAsSlice() |
<TvmSlice>.loadSigned() | | |
<TvmSlice>.loadUnsigned() | | |
<TvmSlice>.loadTons() | | |
<TvmSlice>.loadSlice() | | |
<TvmSlice>.decodeFunctionParams() | | |
<TvmSlice>.skip() | slice_skip_left (*1 2*) | c ->skip( l , r ) |
<TvmSlice>.skip() | slice_skip'_left (*1 1*) | c ->skip(l ) |
<TvmBuilder>.toSlice() | to_slice_right (*0 1*) | c ->toSlice() |
<TvmBuilder>.toCell() | builder_toCell_right (*0 1*) | b ->toCell() |
<TvmBuilder>.size() | size_right (*0 1*) | c->size() |
<TvmBuilder>.bits() | bits_right (*0 0*) | c ->bits() |
<TvmBuilder>.refs() | | |
<TvmBuilder>.remBits() | builder_remBits_right (*0 1*) | c ->remBits() |
<TvmBuilder>.remRefs() | builder_remRefs_right (*0 1*) | c ->remRefs() |
<TvmBuilder>.remBitsAndRefs() | builder_remBitsAndRefs_right (*0 1*) | c ->remBitsAndRefs() |
<TvmBuilder>.depth() | depth_right (*builder_depth*) (*0 1*) | x ->depth() |
<TvmBuilder>.store() | builder_store_left' c (URTuple x .. (URTuple y z) ..) (*arg is one tuple*) (*1 1*) | c -> store ( x , .. , y , z ) |
<TvmBuilder>.storeOnes() | | |
<TvmBuilder>.storeZeroes() | | |
<TvmBuilder>.storeSigned() | | |
<TvmBuilder>.storeUnsigned() | | |
<TvmBuilder>.storeRef() | builder_storeRef_left (*1 1*) | x ->storeRef ( y ) |
<TvmBuilder>.storeTons() | | |
selfdestruct | suicide_left | selfdestruct ( x ) |
now | tvm_now (*0 0*) | now |
address(this) | tvm_address | address(this) |