Such operations as event creation use a specific format when transferring data. The data is being serialized and transferred in the form of a bytes sequence.

Key Features:

We can transfer data in the most suitable form, evading the limitation of a number of function arguments;

Data is being deserialized in a smart contract via the Solidity assembly code which makes this operation fast, and the best option in terms of resource usage;

Only data vital for the business logic of the system is stored on the blockchain. For example, the start and end dates of an event, because this data’s used for various verifications of smart contracts;

Some data’s important for system operability, but doesn’t affect the business logic, for example, an event name and description. Such data, before transferring, is being compressed on the browser side via the BWTC algorithm, to consume less memory while executing the smart contract;

Instead of being stored in smart contract storage, data is stored on the blockchain logs and passed to the Elasticsearch cluster via emitting an event (emit NewEvent) from a smart contract. This approach makes it possible to considerably reduce the gas expenditure;

By transferring all the data, using only the serialized parameter, it becomes possible to use the “transferToContract” function (“Token” smart contract) for transferring tokens, while calling a code of another smart contract (similar to ERC223) within one transaction, without having to use the “approve” function.

Have a closer look at our Technical Paper to learn more about PROOF OF TOSS project and it’s technical insights!