Skip to content

Instantly share code, notes, and snippets.

// example of adding an owner to the mainnet safe via a proposal on the sidechain
const safeKovan = new ethers.Contract(
KOVAN_SAFE_ADDRESS,
GnosisSafeL2.abi,
deployer
)
const safeSokol = new ethers.Contract(
SOKOL_SAFE_ADDRESS,
GnosisSafeL2.abi,
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract Distribute is Ownable {
using Counters for Counters.Counter;
use std::{error::Error};
use fhe::bfv::{self, Encoding, Plaintext, PublicKey, SecretKey};
use fhe_traits::{FheDecoder, FheEncoder, FheEncrypter, Serialize, FheDecrypter};
use rand::{thread_rng};
fn main() -> Result<(), Box<dyn Error>> {
let degree = 4096;
let plaintext_modulus: u64 = 4096;
let moduli = vec![0xffffee001, 0xffffc4001, 0x1ffffe0001];