Skip to content

Instantly share code, notes, and snippets.

View afa7789's full-sized avatar
๐Ÿ
Don't thread on me.

Arthur Abeilice afa7789

๐Ÿ
Don't thread on me.
  • Belo Horizonte, Minas Gerais, Brazil
  • X @afa7789
View GitHub Profile
@afa7789
afa7789 / balance_accounts.py
Last active October 22, 2024 17:32
With a accounts.json I can use simulate transactions and cast_rpc is the checker for the condition that it should be different.
# I have a accounts.json. with [{account:"0xaddress_public_key",private_key:"0xprivate_key"},]
# this creates the info I need to put on cdk-erigon to add balance to the accounts I want to simulate.
import json
# Load accounts data from JSON file
with open('accounts.json', 'r') as f:
data = json.load(f)
# Create a dictionary to store the new formatted data
formatted_data = {}
@afa7789
afa7789 / MultiFactory.sol
Created January 25, 2024 18:49
A contract for Factory, which will support multiple implementations
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
/// @title MultiFactory Contract for creating clones of multiple implementations
/// @dev Extends AccessControl and Initializable from OpenZeppelin
contract MultiFactory is AccessControl, Initializable {