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

feat: Add malicious contract interaction as an option #356

Merged
merged 6 commits into from
Aug 23, 2024

Conversation

pnarayanaswamy
Copy link
Contributor

@pnarayanaswamy pnarayanaswamy commented Aug 22, 2024

Adds a button Malicious Contract Interaction to the PPOM section

image

image

src/index.js Outdated
@@ -1604,6 +1630,30 @@ const initializeFormElements = () => {
console.log(result);
};

// Malicious Mint
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Malicious Mint
// Malicious Contract Interaction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

{
from: accounts[0],
to: contractAddress,
data: '0xef5cfb8c0000000000000000000000000b3e87a076ac4b0d1975f0f232444af6deb96c59',
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting! this calldata is calling the function claimRewards but that doesn't exist in the contracts I've checked. However I do see the Blockaid malicious warning, so I guess it's fine, even if that would make it revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the payload and the accounts are what blockaid are using to test it, so I guess it is ok indeed

src/index.js Outdated
if (networkName === 'mainnet') {
contractAddress = '0x000062Accd1a9d62eF428eC86cA3dD4f45120000';
} else {
contractAddress = '0x00008F1149168C1D2fa1eBa1Ad3e9cD644510000';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would rather move this into the sample contracts file, to make it easier to locate and maintain in the future (but not blocking)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@seaona seaona left a comment

Choose a reason for hiding this comment

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

LGTM! nice addition 😍

@pnarayanaswamy pnarayanaswamy merged commit 3dc8f69 into main Aug 23, 2024
7 checks passed
@pnarayanaswamy pnarayanaswamy deleted the add-malicious-mint branch August 23, 2024 12:16
Copy link

@Blakerose8 Blakerose8 left a comment

Choose a reason for hiding this comment

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

Ok

Copy link

@Blakerose8 Blakerose8 left a comment

Choose a reason for hiding this comment

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

Ok

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