NEWTON
Asked
2 months ago
4
views
0
"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.
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
2 months ago
Did you change the factory/create2 part (to compute pool addresses)? What's easier, adapt the create2 trick in Solidity then transpile or transpile first then adapt in Cairo?
How to submit a StarkNet contract?
hardhat test
Is it possible to transpile contracts that use openzeppelin libraries?
How to use get_fp_and_pc in Cairo Lang?
Is there no way for me to have a struct as a `@storage_var` if it contains an array fo felts inside ?
How to check if a contract has been deployed at a certain address in cairo?
ApeWorX: Using ape starknet accounts list
What is the technical difference of Kakarot compare to Nethermind's Warp?
Does cairo have payable functions?
Is anyone experiencing slowness on goerli StarkNet?
Cairo: Iterating through arrays
How to modify keccak.cairo and/or packed_keccak.cairo to compute a 512bits keccak hash instead of 256 bits?
Cairo v. Solidity