Skip to content

Instantly share code, notes, and snippets.

View pythonpete32's full-sized avatar
πŸ—οΈ
BUIDLing

Aaron Abu Usama pythonpete32

πŸ—οΈ
BUIDLing
View GitHub Profile
@pythonpete32
pythonpete32 / next-tailwind
Created November 5, 2022 11:54
next tailwind
npx create-next-app@latest --ts -e with-tailwindcss next13-dapp-boilerplate
@pythonpete32
pythonpete32 / Index.tsx
Created November 4, 2022 06:07
Renser on client to avoid rehydration error
const HeroCode = dynamic(() => import("../components/HeroCode"), {
ssr: false,
});
{
AllowlistVotingSetup: '0x25104F3333ba2ef4385B976C9ed7E584a66554d2',
DAO: '0x824608Be5A9d505DDd31953746970e49469a8257',
DAOFactory: '0x1366b420364dC3E89aE15680CFf14E86AC51E4b1',
DAORegistry: '0x9a15A8Aa288E75c33697340f68d97e2656C79970',
DAORegistry_Implementation: '0xcBeCf57f0791C6aF7b2aEF66C3c7b2Fe56655b91',
DAORegistry_Proxy: '0x9a15A8Aa288E75c33697340f68d97e2656C79970',
DAO_Implementation: '0xEFaF1b96BD75b50f8FA922cA0ccC42dc1eF61Aac',
DAO_Proxy: '0x824608Be5A9d505DDd31953746970e49469a8257',
ENSRegistry: '0xb2356433A008A3B7196F3247a0c3B04C6De046Cf',
export default {
'31337': {
hardhat: {
name: 'hardhat',
chainId: '31337',
contracts: {},
},
},
'80001': {
mumbai: {
# Transfer 8.6 $NATION to the multisig
load aragonos as ar
# not sure if NATION is in the token list so setting an environment var also we have 3 voting apps so we need to explisitly set it here
set $USDC 0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83
set $VOTING 0x2b7528b8f770db7c26cb2c8d4cd53265b4fa2720
ar:connect testtttttt $VOTING (
act agent $USDC transfer(address,uint256) @me 1e17
)
import React, { useEffect, useState } from 'react'
import { Form, Formik } from 'formik'
const NewVoteCard = () => {
return (
<div className="card w-96 shadow-xl p-4">
<Formik initialValues={{}} onSubmit={() => {}}>
{({ values, errors }) => (
<Form>
<div>form</div>
@pythonpete32
pythonpete32 / path.js
Created September 27, 2022 10:12
forwarding path through dao
let to, calldata, action
// to be executed from voting
to = target.address
calldata = target.interface.encodeFunctionData('increment', [])
action = { to, calldata }
const votingScript = encodeCallScript([action])
// to be executed from tokenManager
to = voting.address
@pythonpete32
pythonpete32 / gist:4128a1e259d669201c36edab7852f657
Created September 27, 2022 07:47
encoding function data ethers
```
console.log('here ', target.interface.encodeFunctionData('increment', []))
```
@pythonpete32
pythonpete32 / event.md
Created September 25, 2022 14:12
get event from reciept
    const receipt: ContractReceipt = await (await nftFactory.newNFT()).wait()
    console.log(receipt.events?.filter((x) => x.event == 'NFTCreated'))
@pythonpete32
pythonpete32 / hardhat.config.ts
Created September 25, 2022 05:16
using frame
import * as dotenv from 'dotenv'
dotenv.config()
import { HardhatUserConfig } from 'hardhat/config'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import '@nomicfoundation/hardhat-network-helpers'
const { MUMBAI_RPC_URL, PRIVATE_KEY, POLYGONSCAN_KEY } = process.env
const config: HardhatUserConfig = {