Skip to content

Instantly share code, notes, and snippets.

View pythonpete32's full-sized avatar
🏗️
BUIDLing

Aaron Abu Usama pythonpete32

🏗️
BUIDLing
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {IVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol";
import {IGovernanceWrappedERC20} from "@aragon/osx/token/ERC20/governance/IGovernanceWrappedERC20.sol";
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
@pythonpete32
pythonpete32 / safe-tranfer.ts
Created October 18, 2023 19:58
sign and transfer tokens from a gnosis safe with a private key signer and frame signer
// ---------------------------------------------------------------------------- //
// GNOSIS SAFE DEPLOYMENT SCRIPT //
// ---------------------------------------------------------------------------- //
import { ethers } from 'ethers'
import Safe, { EthersAdapter } from '@safe-global/protocol-kit'
import SafeApiKit from '@safe-global/api-kit'
import * as dotenv from 'dotenv'
import {CentralizedArbitrator} from './../typechain/contracts/CentralizedArbitrator';
import {ADDRESS_ZERO} from './../test/unit-tests/common';
import deployedContracts from '../deployed_contracts.json';
import hre, {ethers} from 'hardhat';
import config from '../config-dao';
// IPFS IMPORTS
import {BytesLike, ethers} from 'ethers';
import {Web3Storage, File} from 'web3.storage';
import {Buffer} from 'buffer';
import {
ContractVotingSettings,
ITokenVotingPluginInstall,
votingSettingsToContract,
} from "@aragon/sdk-client";
import { SupportedNetworks } from "../types";
import { BigNumber } from "ethers";
import { defaultAbiCoder } from "ethers/lib/utils";
import { activeContractsList } from "@aragon/osx-ethers";
import {CentralizedArbitrator} from './../typechain/contracts/CentralizedArbitrator';
import {ADDRESS_ZERO} from './../test/unit-tests/common';
import deployedContracts from '../deployed_contracts.json';
import hre, {ethers} from 'hardhat';
import config from '../config-dao';
import {
addDeployedContract,
findEventTopicLog,
getNetwork,
hexToBytes,
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"address": "0xD2587c781c4bFE196fbb09060109F4558D3e8da4",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "dao",
"type": "address"
},
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import {IWETH9} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IDAO} from "aragon-plugin-base/contracts/lib/interfaces/IDAO.sol";
import {PluginUUPSUpgradeable} from "aragon-plugin-base/contracts/lib/plugin/PluginUUPSUpgradeable.sol";
/// @title AdminTransferPlugin
/// @notice Enables Admins to transfer ANT Tokens from the DAO to a recipient without a vote.
@pythonpete32
pythonpete32 / contracts...MultisigPlugin.sol
Created November 30, 2022 06: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.10+commit.fc410830.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import {Plugin} from "https://github.com/aragon/core/blob/develop/packages/contracts/contracts/core/plugin/Plugin.sol";
import {IDAO} from "https://github.com/aragon/core/blob/develop/packages/contracts/contracts/core/IDAO.sol";
contract MultisigPlugin is Plugin {
/* ====================================================================== */
/* Permissions */
/* ====================================================================== */
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {PluginUUPSUpgradeable} from "aragon-plugin-base/contracts/lib/plugin/PluginUUPSUpgradeable.sol";
import {IUniswapV2Router} from "./IUniswap.sol";
import {IDAO} from "aragon-plugin-base/contracts/lib/interfaces/IDAO.sol";
/// @title UniswapHelper