Skip to content

Instantly share code, notes, and snippets.

View publu's full-sized avatar

Pablo publu

View GitHub Profile
package main
import (
// "encoding/hex"
"fmt"
"github.com/scroll-tech/zktrie/trie"
"github.com/ethereum/go-ethereum/common"
zkt "github.com/scroll-tech/zktrie/types"
)
@publu
publu / main.py
Last active December 22, 2023 17:50
example get_proof for erc20 from Scroll
from web3 import Web3
import json
from eth_utils import remove_0x_prefix, to_int, to_checksum_address, to_hex
# Connect to an Ethereum node
w3 = Web3(Web3.HTTPProvider('https://scroll-mainnet.public.blastapi.io'))
# User's Address and Token Address
token_address = '0x5300000000000000000000000000000000000004' # weth address
user_address = '0xeFaAE8E0381bD4e23CE9A662cfA833Fb4ED916e5' # whale on scroll
# Zuzalu Improvement Proposals
- **zk-enabled for voting**: A secure and anonymous voting system for all Zuzalu members.
- **High Council of Elders**: The main governing body that holds the brand assets and dictates its usage.
- **Guild Council(s)**: These councils are voted into existence or dissolved as needed. Some of the active ones include:
- ZuConnect (devcon-nect follow-on)
- HackZuzalu (hackathons)
- Zuzalu (main yearly event)
- **Quests we can vote on**:
- Guild Approvals: This gives councils the stamp of approval to join the system.
- Event Approvals: This approves the event brought up by a council
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Importing the necessary Gnosis Safe contracts
import "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol";
import "@gnosis.pm/safe-contracts/contracts/base/Module.sol";
import "@gnosis.pm/safe-contracts/contracts/common/Enum.sol";
import "@gnosis.pm/safe-contracts/contracts/interfaces/IGnosisSafe.sol";
/// @title WhitelistedExecutionModule
{
"success": true,
"result": {
"name": "Bridged Tokens",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"logoURI": "https://wallet-asset.matic.network/img/tokens/eth.svg",
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
/**
* @title TokenWrapper
openapi: 3.0.0
info:
title: KyberSwap API
version: 1.0.0
servers:
- url: 'https://aggregator-api.kyberswap.com'
paths:
/v1/routes:
get:
summary: Get routes
@publu
publu / test
Last active June 4, 2023 23:52
openapi: "3.0.0"
info:
version: "1.0.0"
title: "Beefy Finance API"
description: "API documentation for Beefy Finance"
servers:
- url: https://api.beefy.finance
paths:
/vaults:
get:
/// SPDX-License-Identifier: MIT
/// @title Minuscule Key-Value Store
/// @notice A contract that allows users to store and retrieve key-value pairs on-chain
/// @dev Uses EIP-712 signatures to ensure that only authorized relayers can execute key-value changes
/// @dev Users sign a message that authorizes a specific relayer address to execute the change
/// @dev The signature acts as an API key, and is only valid for a certain period of time
contract Minuscule {
using ECDSA for bytes32;
{
"data": {
"votes": [
{
"id": "0x029c46bec4e4b43d363b70f59ef50de36020d51f:94",
"voter": "0x029c46bec4e4b43d363b70f59ef50de36020d51f",
"timestamp": 1661425458,
"support": true,
"votingPower": "11003000000000000"
},