Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement 0x3B - EXTCODESIZE Opcode #127

Closed
Eikix opened this issue Aug 17, 2023 · 2 comments · Fixed by #447
Closed

feat: implement 0x3B - EXTCODESIZE Opcode #127

Eikix opened this issue Aug 17, 2023 · 2 comments · Fixed by #447
Assignees
Labels
enhancement New feature or request opcode Implementation of an opcode smart-contract-logic A specific type of opcode that requires smart contract logic as opposed to pure cairo

Comments

@Eikix
Copy link
Member

Eikix commented Aug 17, 2023

SinceGroup
FrontierEnvironmental Information

Index 1 is top of the stack. See PUSH.

Stack input

  1. address: 20-byte address of the contract to query.

Stack output

  1. size: byte size of the code.

Example

InputOutput
10x43a61f3f4c73ea0d444c5c1c1a8544067a86219b32

Reproduce in playground.

Error cases

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

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

Gas

The static cost is 0. If the accessed address is warm, the dynamic cost is 100. Otherwise the dynamic cost is 2600. See section access sets.

Estimate your gas cost

State: 'address' is cold?
YesNo
Static gas + dynamic gas = 100
@Eikix Eikix added enhancement New feature or request no-stale smart-contract-logic A specific type of opcode that requires smart contract logic as opposed to pure cairo labels Aug 17, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Aug 17, 2023
@Eikix Eikix changed the title feat: implement 0x38 - EXTCODESIZE Opcode feat: implement 0x3B - EXTCODESIZE Opcode Aug 17, 2023
@Eikix Eikix added opcode Implementation of an opcode and removed no-stale labels Aug 23, 2023
@Eikix Eikix added this to the Kakarot Cairo Migration milestone Aug 29, 2023
@Eikix
Copy link
Member Author

Eikix commented Sep 8, 2023

Important update: we are gathering some bugs in the Kakarot v0 codebase, we need to make sure each issue and each PR in Kakarot-ssj is aware of the lists of known bugs. Look at this link everytime you take an issue and check your issue isn't targeted by a known bug.

@Eikix
Copy link
Member Author

Eikix commented Sep 8, 2023

Important update: we are gathering some bugs in the Kakarot v0 codebase, we need to make sure each issue and each PR in Kakarot-ssj is aware of the lists of known bugs. Look at this tracking issue everytime you take an issue and check your issue isn't targeted by a known bug. Will add this reminder in many places to make sure we keep track of known bugs.

@Eikix Eikix mentioned this issue Oct 20, 2023
9 tasks
@Eikix Eikix self-assigned this Oct 23, 2023
@Eikix Eikix moved this from 🆕 Backlog to 🏗 In progress in Kakarot on Starknet Oct 23, 2023
@Eikix Eikix moved this from 🏗 In progress to 👀 In review in Kakarot on Starknet Oct 23, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Kakarot on Starknet Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request opcode Implementation of an opcode smart-contract-logic A specific type of opcode that requires smart contract logic as opposed to pure cairo
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant