Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
library lib {
function test () public view returns (uint) {
return 14;
}
}
/**
Job description:
Remix is a project funded by the Ethereum Foundation.
We are building tools for smart contract development and are dedicated to helping the Ethereum community by improving its developer experience. We often collaborate with different teams from the Ethereum ecosystem (the Solidity team for example).
We focus in multiple areas of dev tooling:
- Remix libraries are a set of modules critical for dev tools (solidity compiler, unit testing, debugging, static analysis, ...).
- Remix IDE is the application front end which makes uses of these modules.
- Remix plugins provides an API for external teams to integrate with Remix IDE.
@yann300
yann300 / .deps...npm...hardhat...console.sol
Created February 20, 2023 16:59
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';
const api_key = "qmZtKNT5swfCkkHVoZZ8N2HKv656jFXx"
const API_VERSION = "v1"
const API_URL = `https://forge.sindri.app/api/${API_VERSION}/`
const api_key_querystring = `?api_key=${api_key}`
const headers_json = {"Accept": "application/json"}
const headers_multipart = {"Accept": "multipart/form-data"}
const headers_urlencode = {
"Accept": "application/json",
@yann300
yann300 / scripts...sindri.ts
Created October 19, 2023 10:41
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// NOTE: Install dependencies with `npm i axios form-data`.
const axios = require('axios');
const FormData = require("form-data");
const tar = require('tar');
// NOTE: Provide your API key here.
const API_KEY = "qmZtKNT5swfCkkHVoZZ8N2HKv656jFXx";
const API_VERSION = "v1";
const API_URL = `https://forge.sindri.app/api/${API_VERSION}`;
/*
Copyright 2018 0KIMS association.
This file is part of circom (Zero Knowledge Circuit Compiler).
circom is a free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@yann300
yann300 / README.txt
Created November 8, 2023 20:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.21+commit.d9974bed.js&optimize=false&runs=200&gist=
CIRCOM ZKP SEMAPHORE WORKSPACE
Welcome to the Remix Circom ZKP Hash Checker Workspace.
The workspace comprises two main directories:
- circuits: Contains sample hash checker circuit. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
- scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids
in generating Solidity code, which is essential for on-chain deployment.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// End consumer library.
library Client {
/// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.
struct EVMTokenAmount {
address token; // token address on the local chain.
uint256 amount; // Amount of tokens.
}