Ethereum: Script – OP_PUSHDATAs

Ponimania op_pushatas in the walls of Ethereum

Work with the tongue of the Ethereum walls, one of the key functions that provides an efficient and compact code, there is a use
Op_PUSHDAS . In this state, we will consider how structurally these values ​​are subtracted and what they introduce.

What is OP Pushdata?

Values ​​op_pushdata (opcodes for data push) – this is a type type that instructs the Ethereum virtual machine (EVM) to opt out of data at the stake. These values ​​are used in various wall functions, in the volume «Push», «Call» and «Delegcall».

How is the resistant pusdatas OP?

Coding OP Pushdatas occurs after a broken structure:

  • The first byte indicates that the signature or is not signaled.

  • The following two bytes are data that should be stabbed sheets.

Here is the foundation:

`

0x1 0x00 01

`

In this case, the servant 0x1 indicates that the coded signature values ​​(i.e. the jagged person),0x00 and 0x01 enter data that should be stabs on sheets.

Introduction of an unpuddted body form

During the existence of Pushhdds OP in terms of white quality, they can be distracted, because 32 pars are not significant Chisla organs. This ensures the performance and effort of these values.

For example:

`

0x12345678

`

In this case, «0x12345678» represents one -man cells without a sign.

Introduction Telles’ signatures

During the existence of OP_PUSHDAS in the quality of the subscribed body, you need to do the best of transfer and lack. To do this, EVM uses a method called
pack , in which several valuable data is tuned in one bay or word.

For example:

`

0x12345678

|. — (Signano is the whole)

`

In this case, «0x12345678» represents as unsuccessful and subscribed cell value.

application

Ethereum: Script - OP_PUSHDATAs

OP_PUSHDATA are equipped with a gibbula and the efficiency of coded data in Ethereum walls. Ponima, because these subtracted values ​​are structural and what they introduce, disability can be written more efficient and read the code. Independent, you work, work with or without body signatures, the EVM packaging method guarantees that your code will be free and what –oblast.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *