You have used built-in functions, such as send, assert, as_wei_value, concat, and convert. However, there are other useful functions, such as the following:
- slice: The slice phrase is the bytes data type. It's used for tasks such as getting a substring from a string, as shown in the following code:
first_name: bytes[10] = slice(name, start=0, len=10)
- len: This function is used to get the length of values, as shown in the following code:
length_of_name: int128 = len(name)
- selfdestruct: This function is used to destroy the smart contract, as shown in the following code. The argument is the address that this smart contract sends its ethers to:
selfdestruct(self.donatee)
- ceil: This function is used to round the integer to the upper limit, as shown in the following code:
round_heart: int128 = ceil(half_of_my_heart)
- floor: This function is used to round the integer to the lower limit, as shown in the following code:
round_heart: int128 = floor(half_of_my_heart)
- sha3: This is a built-in hashing function, as shown in the following code:
secret_hash: bytes32 = sha3('messi')