0

I'm lost, does anyone understand this code?

        assembly {
            success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)
            // Use "invalid" to make gas estimation work
            switch success case 0 { invalid() }
        }
2
  • 1
    It is calling precompiled contract at address 7 Scalar multiplication on elliptic curve alt_bn128 (See precompiled contracts list at ethereum.stackexchange.com/a/15483).
    – Ismael
    Jan 21, 2021 at 16:03
  • ahhh, makes sense now. Jan 21, 2021 at 16:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.