Skip to content

Instantly share code, notes, and snippets.

View Turupawn's full-sized avatar
馃嚟馃嚦
Karaoke veteran

Ahmed Castro Turupawn

馃嚟馃嚦
Karaoke veteran
View GitHub Profile
Criptoversidad
https://vote.optimism.io/retropgf/3/application/0x2bb6fd5bdce9bec41b0ede8c956aeeef777a3ffa14aaf953e3828c245352363e
Solow
https://vote.optimism.io/retropgf/3/application/0xd2e847d0232af51a0c83586ca0241e5326a42e4547ddb16eac2fa7b9887b741e
Optimism en espa帽ol
https://vote.optimism.io/retropgf/3/application/0x798b48bee9f259cdee46a8f917b3d27aadc31c2c3fcf0d4688db8d139b48f863
Filosofia Codigo
https://vote.optimism.io/retropgf/3/application/0x6c36998db2c142c13535bed9481e4ec4ac6fdad0d616ede7d4b1279d342494ca
Randomness Ceremony
https://vote.optimism.io/retropgf/3/application/0xaa3b9caf85727a484ac82d25594adc78d68fef1291de82be680bf00436164741
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
import { IEAS, AttestationRequest, AttestationRequestData, RevocationRequest, RevocationRequestData } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol";
import { ISchemaRegistry, SchemaRecord, ISchemaResolver } from "@ethereum-attestation-service/eas-contracts/contracts/ISchemaRegistry.sol";
import { NO_EXPIRATION_TIME, EMPTY_UID } from "@ethereum-attestation-service/eas-contracts/contracts/Common.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract ContributionsNFT is ERC721 {
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l1Contract","type":"address"},{"indexed":false,"internalType":"uint256","name":"param1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"param2","type":"uint256"}],"name":"MessageReceivedFromL1","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l2Recipient","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"payload","type":"uint256[]"}],"name":"MessageSentTol2","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"input
@Turupawn
Turupawn / 01token.sol
Last active November 12, 2023 11:29
Scroll Workshop Nov 12
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract SimpleToken is ERC20 {
constructor(
string memory name,
string memory symbol,
uint256 initialSupply
@Turupawn
Turupawn / Crea un token minteable en L2
Created November 1, 2023 20:52
OP Stack token minteable
Crea un token minteable en L2
Siempre en Remix pero esta vez en L2, usa la siguiente [interfaz](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol) del contrato predeployado `OptimismMintableERC20Factory` en el address `0x4200000000000000000000000000000000000012` para crear un token compatible con el bridge:
```solidity
interface OptimismMintableERC20Factory {
function createOptimismMintableERC20(
address _remoteToken,
string memory _name,
string memory _symbol
@Turupawn
Turupawn / erc20_OP_bridge.md
Last active November 2, 2023 20:43
Codigoptimista: Ley de Cadenas y Bridges

En esta sesi贸n lanzaremos un token en Sepolia testnet como L1 y luego usaremos el bridge para mover los tokens a nuestra propia L2.

Para esta sesi贸n puedes usar tu propio nodo de OP Stack, el testnet de Goerli o un nodo que traje preparado para el d铆a de hoy con los siguientes datos:

  • RPC URL: http://157.230.15.238:8545
  • Chain Id: 42069
  • Bridge: 0x35aA7fd8F8Dc7204A4637e646d3f0d8159198173

1. Lanza un token ERC20

Inicimaos lanzando un token ERC20 en L1 desde Remix:

@Turupawn
Turupawn / ScrollSwapETHForUSDC.sol
Last active April 13, 2024 14:48
Scroll Sepolia Swap WETH for USDC in uni V3
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
ACCOUNT = "0xBa5e05cb26b78eDa3A2f8e3b3814726305dcAc83"
API_URL= "https://api.basescan.org/api"
API_KEY = "YOURAPIKEY"
MY_TX_COUNT = 0
INTRACTIONS_WITH_MY_CONTRACTS_COUNT = 0
ONBOARDED_COUNT = 0
ONBOARDED_MULTI_TX_COUNT = 0
ONBOARDED_MULTI_DAY_COUNT = 0

1.Install forge

curl -L https://foundry.paradigm.xyz | bash
source /root/.bashrc
foundryup

2.Create a Project

@Turupawn
Turupawn / ETHERSCANNN.js
Last active October 12, 2023 16:04
馃毈馃毈馃毈
ACCOUNT = "0xFe568475CFc25563B5A5E9769f56b61dF85e7Dec"
API_URL= "https://api-optimistic.etherscan.io/api"
API_KEY = "YOURETHERSCANAPIKEY"
MY_TX_COUNT = 0
INTRACTIONS_WITH_MY_CONTRACTS_COUNT = 0
ONBOARDED_COUNT = 0
ONBOARDED_MULTI_TX_COUNT = 0
ONBOARDED_MULTI_DAY_COUNT = 0