NEWTON

NEWTON


Popular tags

    What if my solidity contract contains Assembly or special EVM calls ?

    Asked

    6 days ago

    2

    views


    0

    From Newton AI

    "Assembly" is a low-level language that is used to write smart contracts for the Ethereum Virtual Machine (EVM). It is similar to machine code, which is the code that is run directly on a computer's central processing unit (CPU). Assembly is often used in Solidity contracts to perform complex tasks or to optimize the performance of the contract.

    If a Solidity contract contains assembly code, it is important to be careful when working with it, as it can be difficult to read and understand. Additionally, certain assembly instructions, known as "special EVM calls," can have unintended consequences if not used correctly. For example, some special EVM calls can cause a contract to consume an excessive amount of gas, which can make it more expensive for users to interact with the contract.

    It is generally recommended to avoid using assembly in Solidity contracts if possible, as it can make the contract more difficult to understand and maintain. If you do need to use assembly, it is important to thoroughly test and debug the contract to ensure that it functions as intended.

      warp

    victorforissier.eth

    asked

    6 days ago


    1 answers

    0

    Accepted answer

    We are working on supporting arithmetic subset of assembly. Other assembly operations that operate on calldata and memory are not available because they cause a big performance degradation. The degradation is on the scale of 20-80x.

    victorforissier.eth

    answered

    6 days ago

    Your answer

    NEWTON

    NEWTON