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

added a script for computing contract addresses #48

Merged
merged 10 commits into from
Oct 21, 2024

Conversation

RobinNagpal
Copy link
Owner

No description provided.

contract ComputeContractAddresses is Script {
address public deployedWalletAddress;

address constant public create2DeployerAddress = 0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2;

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: compound.solidity.constant-not-in-uppercase Note

A constant name is not in UPPER_CASE like other constant variables.
function run() external {
uint256 passedChainId = vm.envUint("CHAIN_ID");

require(block.chainid == passedChainId, "Chain ID mismatch");

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.
}: SourceTokenParameters) {
let amount = BigNumber.from(amount_);
if (amount.isZero()) {
return;
} else if (amount.isNegative()) {
await removeTokens(dm, amount.abs(), asset, address);
} else {
await addTokens(dm, amount, asset, address, [address].concat(blacklist));
if(blockNumber) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra if statement

100000,
rewardTokenAddress,
newRewards.address,
2751700
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment for these values. Why these values?

@@ -63,7 +63,7 @@ export class ProposalConstraint<T extends CometContext> implements StaticConstra
}

// temporary hack to skip proposal 329
if (proposal.id.eq(329)) {
if (proposal.id.eq(349) || proposal.id.eq(350)) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these

address: recipientAddress,
blacklist: [comet.address],
});
if (blockNumber) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra if statement can be removed

@RobinNagpal RobinNagpal merged commit c60c008 into market_updte_v1_changes Oct 21, 2024
5 of 38 checks passed
@RobinNagpal RobinNagpal deleted the other_chain_deployments branch October 21, 2024 16:42
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.

2 participants