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

Squash Sonic USDC.e #136

Open
wants to merge 71 commits into
base: squash-sonic
Choose a base branch
from

Conversation

MishaShWoof
Copy link
Collaborator

No description provided.

MishaShWoof and others added 28 commits January 15, 2025 13:34
…xtension-audit-fix

Audit fixes to collateral extension
…software/comet into woof-software/deploy-sonic-usdc-market
…software/comet into woof-software/deploy-sonic-usdc-market
Comment on lines +23 to +25
constructor(address l2Router_) {
l2Router = l2Router_;
}

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: compound.solidity.missing-constructor-sanity-checks Warning

There're no sanity checks for the constructor argument l2Router_.
Comment on lines +23 to +25
constructor(address l2Router_) {
l2Router = l2Router_;
}

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.non-payable-constructor Note

Consider making costructor payable to save gas.
}

function toAddress(bytes memory data) public pure returns (address addr) {
require(data.length >= 20, "Invalid data length");

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers
to describe the error in detail using NatSpec.
Comment on lines +22 to +26
function initialize(address _timelock, address _bridge) public {
require(timelock == address(0), "already initialized");
timelock = _timelock;
bridge = _bridge;
}

Check failure

Code scanning / Semgrep OSS

Semgrep Finding: compound.solidity.lack-of-revert-alreadyinitialized Error

Function initialize() doesn't have AlreadyInitialized revert
mapping(uint256 => ClaimData) public claims;

function initialize(address _timelock, address _bridge) public {
require(timelock == address(0), "already initialized");

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers
to describe the error in detail using NatSpec.
(bool success, bytes memory returnData) = targets[i].call{value: values[i]}(callDatas[i]);
if (!success) {
// revert with the original error message from the call
if (returnData.length > 0) {

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.array-length-outside-loop Note

Caching the array length outside a loop saves reading it on each iteration, as long as the array's length is not changed during the loop.
revert(add(32, returnData), returndata_size)
}
} else {
revert("Delegator: call failed");

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers
to describe the error in detail using NatSpec.
Comment on lines +23 to +25
constructor(address l2Router_) {
l2Router = l2Router_;
}

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: compound.solidity.missing-constructor-sanity-checks Warning

There're no sanity checks for the constructor argument l2Router_.
Comment on lines +23 to +25
constructor(address l2Router_) {
l2Router = l2Router_;
}

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.non-payable-constructor Note

Consider making costructor payable to save gas.
}

function toAddress(bytes memory data) public pure returns (address addr) {
require(data.length >= 20, "Invalid data length");

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers
to describe the error in detail using NatSpec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants