0

We can define a function like this

 function A() external pure {
        assembly {
            
            function doSomthing() -> data { // We define this method in the A function

            }
            let x := doSomthing() 
         
        }
    }

How can I use doSomthing() function in another assembly-inline

for Example

 function B() external pure {
        assembly {
            let x := doSomthing()
        }
    }

Is such a thing possible at all? If so, how can I define a global assembly method?

I know I can use the staticcall(), call() to call another method on my contract, I mean calling an assembly method

thanks

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.