Skip to content

Instantly share code, notes, and snippets.

View burgossrodrigo's full-sized avatar

Rodrigo Burgos burgossrodrigo

View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC20 {
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract EthusTokenLockVault {
struct Lock {
@burgossrodrigo
burgossrodrigo / remove-node-modules.md
Created January 31, 2025 20:07 — forked from lmcneel/remove-node-modules.md
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
#!/bin/bash
# Update the system
sudo apt-get update -y
sudo apt-get upgrade -y
# Install Git
sudo apt-get install -y git
# Install Docker
#!/bin/bash
HOST_ORIGEM=db.us-east-1.rds.amazonaws.com
HOST_DESTINO=db.cluster-cf880msq8y91.us-east-1.rds.amazonaws.com
USER_ORIGEM=postgres
USER_DESTINO=postgres
DATABASE=bia
FILE=dump_bia.tar
chmod 0600 .pgpass
import { Injectable } from '@nestjs/common';
import { ethers } from 'ethers';
import { ApiKeyCreds, ApiKeysResponse, ClobClient, OpenOrder, OpenOrdersResponse, OrderScoring, OrderType } from '@polymarket/clob-client';
import { ICanceledOrders, IPlacedOrderResponse } from './clob.interface';
import { ERRORS_ENUM } from './clob.enum';
@Injectable()
export class ClobService {
constructor() { }
@burgossrodrigo
burgossrodrigo / main.go
Created June 11, 2024 21:15
Decoding tx input data
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/ethereum/go-ethereum/common"
ethGotypes "github.com/ethereum/go-ethereum/core/types"
import requests
from web3 import Web3
# Retrieve the ABI from Etherscan
abi_url = "https://api.etherscan.io/api?module=contract&action=getabi&address=0x63942E31E98f1833A234077F47880A66136a2D1e&format=raw"
response = requests.get(abi_url)
votium_bribe_abi = response.json()
# Connect to an Ethereum node (e.g., Infura)
infura_url = "https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID"
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
//ETHEREUM SERVICE
import { Injectable } from '@nestjs/common';
import { ethers } from 'ethers';
import { BSC_MAINNET_URL, ETHEREUM_MAINNET_URL } from './ethereum.constants';
import { networkNames } from './ethereum.enum';
@Injectable()
export class EthereumService {
constructor() { }
package main
import (
"context"
"fmt"
"log"
"os"
"math/big"