Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.07 KB

3B.mdx

File metadata and controls

34 lines (21 loc) · 1.07 KB
fork group
Frontier
Environmental Information

Index 1 is top of the stack. See PUSH.

Notes

Not allowed in EOFv1 code, code containing this instruction will fail validation.

Stack input

  1. address: 20-byte address of the contract to query. If address points to an EOF contract, result is as if its code was EF00.

Stack output

  1. size: byte size of the code.

Example

* Input Output
1 0x43a61f3f4c73ea0d444c5c1c1a8544067a86219b 32

[Reproduce in playground][1].

[1]: /playground?unit=Wei&codeType=Mnemonic&code='gCQYthacQ8%20GJ%20a_-deW7...p0KWJ6l5260206lF3NNNNN0p32KjjgCBm8mY-dVabovep41p0p0jCREATE%20gPutsmnew)addresLjjgThVaddres_iL%2C%20wVcan%20querymsizejEXTCODESIZE'~JJJFp91%20m%20thVl000j%5Cng%2F%2F)-ntracs%20Y-nstructor%20W9G0xVe%20QB_a%20NlllL_onmstackKjMSTOREJFFG32%20Breate9jPUSH8fwith.~~~-cot%20)%20f%01)-.89BGJKLNQVWY_fgjlmp~

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.