Code Monkey home page Code Monkey logo

ext-evm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ext-evm's Issues

@ethersproject asm disassemble unknow opcodes

Ethers Version

5.7.0

Search Terms

asm

Describe the Problem

I am using asm disassemble on bytecode generated by solitidty 0.8.13 and got several unknown opcodes

Code Snippet

// SPDX-License-Identifier: AGPL-1.0
pragma solidity 0.8.13;

contract Test {
	constructor() {}

	function test() external {}
}


generated asm: using disassemble + formatBytecode
```asm
0000 : 0x80                                                               ; ethers-io/ethers.js#1 
0002 : 0x40                                                               ; ethers-io/ethers.js#1 
0004 : MSTORE
0005 : CALLVALUE
0006 : DUP1
0007 : ISZERO
0008 : 0x0f                                                               ; ethers-io/ethers.js#1 
000a : JUMPI
000b : 0x00                                                               ; ethers-io/ethers.js#1 
000d : DUP1
000e : REVERT
000f*: JUMPDEST
0010 : POP
0011 : 0x65                                                               ; ethers-io/ethers.js#1 
0013 : DUP1
0014 : 0x1d                                                               ; ethers-io/ethers.js#1 
0016 : 0x00                                                               ; ethers-io/ethers.js#1 
0018 : CODECOPY
0019 : 0x00                                                               ; ethers-io/ethers.js#1 
001b : RETURN
001c : INVALID
001d : 0x80                                                               ; ethers-io/ethers.js#1 
001f : 0x40                                                               ; ethers-io/ethers.js#1 
0021 : MSTORE
0022 : CALLVALUE
0023 : DUP1
0024 : ISZERO
0025 : 0x0f                                                               ; ethers-io/ethers.js#1 
0027 : JUMPI
0028 : 0x00                                                               ; ethers-io/ethers.js#1 
002a : DUP1
002b : REVERT
002c*: JUMPDEST
002d : POP
002e : 0x04                                                               ; ethers-io/ethers.js#1 
0030 : CALLDATASIZE
0031 : LT
0032 : 0x28                                                               ; ethers-io/ethers.js#1 
0034 : JUMPI
0035 : 0x00                                                               ; ethers-io/ethers.js#1 
0037 : CALLDATALOAD
0038 : 0xe0                                                               ; ethers-io/ethers.js#1 
003a : SHR
003b : DUP1
003c : 0xf8a8fd6d                                                         ; ethers-io/ethers.js#4 
0041 : EQ
0042 : 0x2d                                                               ; ethers-io/ethers.js#1 
0044 : JUMPI
0045*: JUMPDEST
0046 : 0x00                                                               ; ethers-io/ethers.js#1 
0048 : DUP1
0049 : REVERT
004a*: JUMPDEST
004b : STOP
004c : INVALID
004d : LOG2
004e : 0x6970667358                                                       ; ethers-io/ethers.js#5 
0054 : unknown (0x22)
0055 : SLT
0056 : SHA3
0057 : unknown (0xaf)
0058 : unknown (0xdd)
0059 : 0x49bbc60d2b1ec3cd669ec0f050abeb9f                                 ; ethers-io/ethers.js#16 
006a : EXP
006b : unknown (0xbc)
006c : PUSH22                                                             ; OOB!! 
006d : unknown (0xae)
006e : unknown (0xfb)
006f : unknown (0xbd)
0070 : 0x9c811407c2f464736f6c63                                           ; ethers-io/ethers.js#11 
007c : NUMBER
007d : STOP
007e : ADDMOD
007f : unknown (0x0d)
0080 : STOP
0081 : CALLER


### Contract ABI

_No response_

### Errors

_No response_

### Environment

node.js (v12 or newer)

### Environment (Other)

_No response_

@ethersproject/asm not working in browser

Ethers Version

5.7.0

Search Terms

asm,browser

Describe the Problem

I am using vitejs.dev/ and I get this error when using @ethersproject/asm in browser :

client-manifest.js?t=1663412740209:14 ReferenceError: exports is not defined
    at _parser.js:785:15

Code Snippet

No response

Contract ABI

No response

Errors

client-manifest.js?t=1663412740209:14 ReferenceError: exports is not defined
    at _parser.js:785:15


### Environment

Browser (Chrome, Safari, etc)

### Environment (Other)

_No response_

asm peckage documentation

Suggestion

Starting to play with asm to make some small contract but I am having hard time figuring out how the whole thing works

I looked at lurch for inspiration, but I do not know what $$ means for example
Any pointer, example of smart contract in asm would be helpful :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.