- Parse an STObject pointed to by
- Write a new STObject to
field_idif it was present in the original object.
int64_t sto_erase ( uint32_t write_ptr, uint32_t write_len, uint32_t read_ptr, uint32_t read_len, uint32_t field_id );
Field ID encoding
sto_apis accept a
field_idparameter encoded as follows:
(type << 16U) + field
Thus type 1 field 2 would be
int64_t result = sto_erase(tx_out, sizeof(tx_out), tx_in, tx_len, sfSigners); if (tx_len <= 0) rollback("Erasing failed.", 15, 1);
sto_eraseis the same as
|write_ptr||uint32_t||The buffer to write the modified STObject to|
|write_len||uint32_t||The length of the output buffer|
|read_ptr||uint32_t||The buffer to read the source STObject from|
|read_len||uint32_t||The Length of the source object|
|int64_t||The number of bytes written to |
If negative, an error:
- pointers/lengths specified outside of hook memory.
- Output buffer must be at least as large as the source object.
- Field you are attempting to erase from is too large
- The supplied STObject is malformed or not an STObject.
- The specified