Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean code commets and console_log calls on main #34

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions precompiles/EcAdd.yul
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ object "EcAdd" {
code { }
object "EcAdd_deployed" {
code {
////////////////////////////////////////////////////////////////
// CONSTANTS
////////////////////////////////////////////////////////////////

// CONSTANTS

/// @notice Constant function for value zero.
/// @return zero The value zero.
function ZERO() -> zero {
Expand Down Expand Up @@ -50,9 +48,7 @@ object "EcAdd" {
ret := 111032442853175714102588374283752698368366046808579839647964533820976443843465
}

//////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
//////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS

/// @dev Executes the `precompileCall` opcode.
function precompileCall(precompileParams, gasToBurn) -> ret {
Expand Down Expand Up @@ -273,9 +269,7 @@ object "EcAdd" {
quotient := montgomeryMul(dividend, montgomeryModularInverse(divisor))
}

////////////////////////////////////////////////////////////////
// FALLBACK
////////////////////////////////////////////////////////////////
// FALLBACK

// Retrieve the coordinates from the calldata
let x1 := calldataload(0)
Expand Down
12 changes: 3 additions & 9 deletions precompiles/EcMul.yul
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ object "EcMul" {
code { }
object "EcMul_deployed" {
code {
////////////////////////////////////////////////////////////////
// CONSTANTS
////////////////////////////////////////////////////////////////
// CONSTANTS

/// @notice Constant function for value zero.
/// @return zero The value zero.
Expand Down Expand Up @@ -75,9 +73,7 @@ object "EcMul" {
ret := 111032442853175714102588374283752698368366046808579839647964533820976443843465
}

// ////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
// ////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS

/// @dev Executes the `precompileCall` opcode.
function precompileCall(precompileParams, gasToBurn) -> ret {
Expand Down Expand Up @@ -346,9 +342,7 @@ object "EcMul" {
}
}

////////////////////////////////////////////////////////////////
// FALLBACK
////////////////////////////////////////////////////////////////
// FALLBACK

// Retrieve the coordinates from the calldata
let x := calldataload(0)
Expand Down
265 changes: 0 additions & 265 deletions precompiles/EcPairing.yul

This file was deleted.

12 changes: 3 additions & 9 deletions precompiles/Modexp.yul
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ object "ModExp" {
code { }
object "ModExp_deployed" {
code {
////////////////////////////////////////////////////////////////
// CONSTANTS
////////////////////////////////////////////////////////////////
// CONSTANTS

function ZERO() -> zero {
zero := 0x0
Expand All @@ -22,9 +20,7 @@ object "ModExp" {
word := 0x20
}

//////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
//////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS

function exponentIsZero(exponent_limbs, exponent_pointer) -> isZero {
isZero := ZERO()
Expand All @@ -40,9 +36,7 @@ object "ModExp" {
isZero := iszero(isZero)
}

////////////////////////////////////////////////////////////////
// FALLBACK
////////////////////////////////////////////////////////////////
// FALLBACK

let base_length := calldataload(0)
let exponent_length := calldataload(32)
Expand Down
Loading