Skip to content

Instantly share code, notes, and snippets.

Avatar
💯

Maurelian maurelian

💯
View GitHub Profile
@maurelian
maurelian / gpt-ownable-non-bug.md
Created December 12, 2022 16:25
Smart contract bug reported by chatGPT
View gpt-ownable-non-bug.md

Description

A security vulnerability has been identified in the Ownable contract. The vulnerability lies in the constructor function, which allows anyone to become the owner of the contract without any authentication or authorization. This could potentially allow malicious actors to gain control of the contract and use it for malicious purposes.

The vulnerability can be exploited by sending a transaction to the contract from any address. This would set the _owner variable to the address of the sender, granting them full control of the contract. This could allow malicious actors to modify the contract, transfer funds, or otherwise

View Element_Ecosystem_ZK_Claim_Gist.md

0x1889dc51448166ca751b713f4532e293c9f22cbd7a2354ec4c1ec18012cf50ec

@maurelian
maurelian / synthetix-changes-checklist.md
Last active October 25, 2021 18:00
SIP-182 Review Checklist for Optimism Regenesis
View synthetix-changes-checklist.md

Checklist used to review this PR to ensure no breaking changes after regenesis. Based on the changeset doc.

  1. Unverified contracts

    • Contracts whose source code has not been verified on Etherscan (Kovan, Optimistic Ethereum) will be wiped out along with their storage.
    • NOTE: Please very that you're not calling any unverified contracts.
  2. Contracts whose source code has been verified will be recompiled with the standard Solidity compiler. As a result of this:

  3. The EXTCODEHASH and CODESIZE of every contract will change.

View changeset.md

List of key breaking changes to watch for:

  1. Unverified contracts:

    1. Contracts whose source code has not been verified on Etherscan (Kovan, Optimistic Ethereum) will be wiped out along with their storage.
  2. Contracts whose source code has been verified will be recompiled with the standard Solidity compiler. As a result of this:

@maurelian
maurelian / HowToOVM2.md
Last active October 11, 2021 19:33
Tutorial for modifying solidity (or any evm) contracts to run on OVM2.0
@maurelian
maurelian / L2toL1Flow.md
Created January 20, 2021 00:11
Description of the withdrawal flow from Optimistic Ethereum's L2
View L2toL1Flow.md

Description of the withdrawal flow

Starting on L2:

  • Any account on L2 may call OVM_L2CrossDomainMessenger.sendMessage() with the information for the L1 message (aka xDomainCalldata)
    • (ie. _target, msg.sender, _message)
    • This data is hashed with the messageNonce storage variable, and the hash is store in the sentMessages mapping (this is not actually used AFAIK)
    • The messageNonce is then incremented.
  • The OVM_L2CrossDomainMessenger then passes the xDomainCalldata to OVM_L2ToL1MessagePasser.passMessageToL1()
  • the xDomainCalldata is hashed with msg.sender (ie. ovmCaller), and written to the sentMessages mapping.
@maurelian
maurelian / token_checklist.md
Created December 8, 2020 15:24 — forked from shayanb/token_checklist.md
Token Checklist Table
View token_checklist.md
Token Feature Known Vulnerabilities Resources Examples
ERC20 Allowance Double withdrawal (front-running)
View HiO-Panvala-Staking.md

Make your Gitcoin Grants go further

Not sure which Gitcoin grants you want to support? We've curated a list of great projects to make it easy for you to decide AND make your donations go even further.

The Hashing it Out podcast, with support from Status.im and ConsenSys Diligence has organized a Staking Cluster, giving us access to a whole bunch of the PAN tokens allocated to this round of Gitcoin Grants. In total the HiO community has 29% of a pool of 1,424,551 PAN tokens (worth ~$50,000). (Learn more in episode 83 with Panvala Founder Niran Babalola)

How it works

When you donate with PAN tokens to any of the grants we've selected, your donation will receiving matching funds from the new Panvala issuance. The current multiplier is over 5x!

View immutable-check.sol
pragma solidity ^0.6.0;
contract Test {
uint public immutable something = 20;
constructor() public {
something = block.timestamp;
// TypeError: Immutable state variable already initialized.
// something = block.timestamp;
// ^-------^