Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup scripts for disbursing basenames (along with record setting) #209

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6e1c1eb
Setup scripts for disbursing basenames (along with record setting)
stevieraykatz Aug 27, 2024
1f17dbb
Add fileparser and mechanism for running batches
stevieraykatz Aug 28, 2024
a1607de
Add post-call assertions
stevieraykatz Aug 28, 2024
12aa3b1
Setup for first try
stevieraykatz Aug 28, 2024
8cbe3e1
Cleanup readme
stevieraykatz Aug 28, 2024
2aaef39
Cleanup env file
stevieraykatz Aug 28, 2024
26f4333
disbursement1 executed
stevieraykatz Aug 29, 2024
94b8966
Add disbursement2, ready to sign
stevieraykatz Aug 29, 2024
056f40a
Fix disbursement2
stevieraykatz Aug 29, 2024
be9caef
slim down disbursement2 for dogfood test
stevieraykatz Sep 3, 2024
03aecff
run disbursement2
stevieraykatz Sep 3, 2024
9ad285f
Add nonce parsing logic
stevieraykatz Sep 3, 2024
61860b4
Update readme
stevieraykatz Sep 3, 2024
38a7c56
adding disbursement4.csv
tspoon1 Sep 5, 2024
963c017
testing verified commit
tspoon1 Sep 5, 2024
b129302
testing again for signed commit
tspoon1 Sep 5, 2024
b5dba18
Update execute to take nonce/file number arg
stevieraykatz Sep 5, 2024
6eaf744
Execute disbursement3
stevieraykatz Sep 6, 2024
0aa5916
final file for disbursement4
tspoon1 Sep 9, 2024
1d03609
final file for disbursement5
tspoon1 Sep 9, 2024
1755beb
[WIP] file for disbursement6
tspoon1 Sep 9, 2024
283caeb
Final file for disbursement6
tspoon1 Sep 9, 2024
58ceebf
Final v2 file for disbursement6
tspoon1 Sep 9, 2024
4c9b46f
adding new 5,6,7 files in batches of 20
tspoon1 Sep 11, 2024
3697447
removing pith from disbursement5.csv
tspoon1 Sep 11, 2024
e763e9a
Setup coin.base.eth disbursement
stevieraykatz Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BASE_CONTRACTS_COMMIT=4202fd86330404d337c1b9dc3acc59df27b4ab61

ECOSYSTEM_MULTISIG=0xB5fa2Ea9845C67c76b1813D4778601F209875Bf6

REGISTRY_ADDR=0xb94704422c2a1e396835a571837aa5ae53285a95
BASE_REGISTRAR_ADDR=0x03c4738ee98ae44591e1a4a4f3cab6641d95dd9a
L2_RESOLVER_ADDR=0xC6d566A56A1aFf6508b41f6c90ff131615583BCD

SIGNATURES=
81 changes: 81 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
include ../.env
include .env

ifndef LEDGER_ACCOUNT
override LEDGER_ACCOUNT = 0
endif

.PHONY: sign-disbursement1
sign-disbursement1:
./parser.sh disbursement1.csv; $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L2_RPC_URL) DisburseBasenames \
--sig "sign()"

.PHONY: sign-disbursement2
sign-disbursement2:
./parser.sh disbursement2.csv; $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L2_RPC_URL) DisburseBasenames \
--sig "sign()"

ifeq (sign,$(firstword $(MAKECMDGOALS)))
RUN_ARG := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARG):;@:)
endif

.PHONY: sign
sign:
./parser.sh "disbursement$(RUN_ARG).csv"; $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \
forge script --rpc-url $(L2_RPC_URL) DisburseBasenames \
--sig "signWithNonce(uint256)" $(RUN_ARG)


ifeq (execute,$(firstword $(MAKECMDGOALS)))
RUN_ARG := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARG):;@:)
endif

.PHONY: execute
execute:
./parser.sh "disbursement$(RUN_ARG).csv"; forge script --rpc-url $(L2_RPC_URL) DisburseBasenames \
--sig "executeWithNonce(uint256,bytes)" $(RUN_ARG) $(SIGNATURES) --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast



ifndef $(GOPATH)
GOPATH=$(shell go env GOPATH)
export GOPATH
endif

##
# Solidity Setup
##
.PHONY: deps
deps: install-eip712sign clean-lib forge-deps checkout-base-contracts-commit parser-setup

.PHONY: install-eip712sign
install-eip712sign:
go install github.com/base-org/[email protected]

.PHONY: clean-lib
clean-lib:
rm -rf lib

.PHONY: forge-deps
forge-deps:
forge install --no-git github.com/foundry-rs/forge-std \
github.com/base-org/basenames@108224def286db0d904b1848b3dfd5a6accce058

.PHONY: checkout-base-contracts-commit
checkout-base-contracts-commit:
[ -n "$(BASE_CONTRACTS_COMMIT)" ] || (echo "BASE_CONTRACTS_COMMIT must be set in .env" && exit 1)
rm -rf lib/base-contracts
mkdir -p lib/base-contracts
cd lib/base-contracts; \
git init; \
git remote add origin https://github.com/base-org/contracts.git; \
git fetch --depth=1 origin $(BASE_CONTRACTS_COMMIT); \
git reset --hard FETCH_HEAD

.PHONY: parser-setup
parser-setup:
chmod +x parser.sh
8 changes: 8 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
To sign, multisig signers will need to:
1. Clone the contract-deployments repo and checkout the disburse-basenames branch
2. cd into the 2024-08-27-disburse-basenames directory
3. run `make deps`
4. run `make sign {NUMBER}` where `NUMBER` corresponds to both the `nonce` and the disbursement csv file.
5. With your ledger connected, it will prompt you to sign the message hash
6. With your ledger disconnected, this will generate a tenderly sim
7. Copy the tenderly sim link into your browser. Grab the calldata blob and paste it into the `Enter raw input data` field on the left. Verify that the state transitions are valid. Specifically check that the NFT tokens are being sent to the addresses specified in the csv.
8 changes: 8 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singles": [
{
"name": "coin",
"addr": "0x52E6De8B2AE95257E70B0E4B2321263a69594623"
}
]
}
1 change: 1 addition & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
neodaoist,0x4BBa239C9cC83619228457502227D801e4738bA0
1 change: 1 addition & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dimo,0x0a3092E52BD2565e451E846f064D63dC6864FF06,,
39 changes: 39 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
brian,0x5b76f5B8fc9D700624F78208132f91AD4e61a1f0,,
brianarmstrong,0x5b76f5B8fc9D700624F78208132f91AD4e61a1f0,,
gregtusar,0x9a0877eA7B2A0ACD59e68D5594c09F09Bb95d94d,,
gregorytusar,0x9a0877eA7B2A0ACD59e68D5594c09F09Bb95d94d,,
alesiahaas,0xbeb981f82ea4a2bebd0cc366fa4fc11a94697976,,
alesiajhaas,0xbeb981f82ea4a2bebd0cc366fa4fc11a94697976,,
jpollak,0x2211d1D0020DAEA8039E46Cf1367962070d77DA9,,
maxbranzburg,0x416e0C10a3760A35f1891455f30e415e96FBD779,,
paulgrewal,0x9A34A73650396e603eDB3b12d56a9Ebf270a9720,,
patchwork,0x0434A5D1D94cA3aa838B8C1F77f2da0b70ac357c,,
pods,0x050549F8c196Bf1bcC293172746c847fD4D77d9d,,
llamao,0x08a3c2A819E3de7ACa384c798269B3Ce1CD0e437,,
defillama,0x08a3c2A819E3de7ACa384c798269B3Ce1CD0e437,,
llama,0x08a3c2A819E3de7ACa384c798269B3Ce1CD0e437,,
llamanodes,0x08a3c2A819E3de7ACa384c798269B3Ce1CD0e437,,
rodeo,0x0C05C7e20Ae245ad9F8f2a3aF8e729c1eF5B6B77,,
highlight,0x168FEB2E7de2aC0c37a239261D3F9e1b396F22a2,,
chronoforge,0x17A45F80eFd20594afE2c59D7e1Ae7AB0c6954Cc,,
arkham,0x19710D5180A69D89F9Aa464B33cc5c30AcA0Ce4a,,
wagmigames,0x19E96afDE76D4eb120D9c0F1609E6e4AFa077fF3,,
beefy,0x1A07DceEfeEbBA3D1873e2B92BeF190d2f11C3cB,,
rarible,0x1cf0dF2A5A20Cd61d68d4489eEBbf85b8d39e18a,,
blockscout,0x242ba6d68FfEb4a098B591B32d370F973FF882B7,,
synfutures,0x27AebE9c8954fC9ccfC4B0d477396188B8bfd832,,
subquery,0x31E99bdA5939bA2e7528707507b017f43b67F89B,,
rounds,0x322D9d4FAD6a33D27448cb646292E1bf893f40DD,,
farworld,0x33C5dFAB83B10E7f29b4D6bce7839F6125fbBa28,,
rabby,0x341a1fBD51825E5a107DB54cCb3166DeBA145479,,
debank,0x341a1fBD51825E5a107DB54cCb3166DeBA145479,,
mavia,0x354086d5ecFa27749732c7E931152B2517E3059A,,
avantis,0x3775AF82c6C5705140944cD515fE899214Fb0288,,
l2beat,0x41626BA92c0C2a1aD38fC83920300434082B1870,,
dynamic,0x475D59919aBced714a52E33511e505b94CfC6dBa,,
nansen,0x4a7c6899cdcb379e284fbfd045462e751da4c7ce,,
signal,0x4AEf5F616C4F7f042EB292e57fc159F8b71C413E,,
cooprecords,0x512b55b00d744fC2eDB8474f223a7498c3e5a7ce,,
iskra,0x5418707F24784906915bCE1304c7F290C7110F47,,
etherfi,0x54dcbE3cDFf4543316C020D35FA583c0C47a3850,,
ethlas,0x56592eCAd18Fe1b3438b21d718afd97885350AfC,,
39 changes: 39 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
aavegotchi,0x027Ffd3c119567e85998f4E6B9c3d83D5702660c
hypersub,0x0749D613185F4ad31CB6f9B525B5102b6a9b7AE3
thirdweb,0x09Ac766EA8F52873a1EfD8813C118AFb7218eCD0
yellow,0x0b379F1848fA2aab7790966373618F4B0Fea6A6e
rampnetwork,0x0be2b18bB9B454427D43baae57b4f63938595910
metamask,0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb
fxhash,0x1014f9499259988e35F1C45F6aE6Aa9FBA011E80
opencover,0x15b72e6d1343aA40A34833238890D78D5B2218F1
hop,0x1ec078551A5ac8F0f51fAc57Ffc48Ea7d9A86E9d
aragonproject,0x210532ddfcd50c55ef40f5c3cf0dc05f7715de26
omni,0x24974675deAc932Ca967015c00C28857Edf2452f
mintify,0x2DCC7c4Ab800bF67380e2553BE1E6891A36F18E7
blockpi,0x364020282B9A82f6Be32fd20Ff829b7F0AacD118
maple,0x3A5ab01B4E142F41f54a861c984D19C866Ec1736
blocto,0x3f74f0af1FA2B2308dd157c7f163307e52e7fED4
coingecko,0x4Cdc86fa95Ec2704f0849825f1F8b077deeD8d39
dappradar,0x54C8141B74953a2214Be9B38af2270245cC09FAc
superbridge,0x56Bf3EB4d343C679a8bDd78d2729D11d6a2eA348
biconomy,0x59118EB3d4EDC922d4cBFa269963c21cBD3582bb
lido,0x5A9d695c518e95CD6Ea101f2f25fC2AE18486A61
galxe,0x5aB0Fdc6F0CA9Ea178c95cECCf944A4ce1AedDdD
pinata,0x5ba9355a10611Ed4339526472a59bEfed3549bAD
crossmint,0x5CD2725A727886b78f182040A40DEEAd7c1F20Ca
harvestfi,0x5cDb7E6Ae383F7c28c07C2C8B6963864ba3558C5
daylightxyz,0x6860A976Ad57C6C41d3697682CdAcE90c8db3c26
snapshot,0x6910d649F8c24c39e6010ACC62c65225E534Ea97
chimpers,0x6Cc435F69fbac8cCdDc8757E46A9D4376FDB16b5
graphprotocol,0x6fc78dcc8A949d1530035bD577DCB21e9787100e
dune,0x7058decc644317062f90525f4C1489AaF456e6B3
etherscan,0x71C7656EC7ab88b098defB751B7401B5f6d8976F
alchemy,0x72EAa8ba8726a10D5e0d8441c592451C7C6670FC
lavanetwork,0x751c3639c59Ac22fA1039BE7dd754EEc03d4a8C5
rainbow,0x7a3d05c70581bD345fe117c06e45f9669205384f
bonfire,0x7AcC1f792556A1dfF2BaB8c7c51342F2be49bE7f
layer3,0x7B0befc5B043148Cd7bD5cFeEEf7BC63D28edEC0
zora,0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6
watches,0x7CbC1044606B342c9158B438C54D43E7AA21ccc5
nethermind,0x7D82569F9871726C3259aAc2E6057A745C70DC8C
eas,0x819068f71Ea2cdB93e001D7AA26CA732F62295fF
1 change: 1 addition & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement5.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coin,0x52E6De8B2AE95257E70B0E4B2321263a69594623,,
19 changes: 19 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement6.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
stargatefinance,0x81EAb64E630C4a2E3E849268A6B64cb76D1C8109,,
caldera,0x87Ef0aB1189F76eBCaEe736A5EB8F639a8cF156d,,
parallel,0x8982Bd35f40f95f348A06902474BE0b5872c1D31,,
jumper,0x91aD352C1e419E6AA579F6a9307A7D88b28a147C,,
bsx,0x974dD3B4e5E00BC3117Fbba15E521B6B5aFC151C,,
seamless,0xA1b5f2cc9B407177CD8a4ACF1699fa0b99955A22,,
ankr,0xA30a04384c162f4458aa5919a0FAE2db579d802a,,
oku,0xa6e8772af29b29B9202a073f8E36f447689BEef6,,
odos,0xa7471690db0c93a7F827D1894c78Df7379be11c0,,
gelato,0xAabB54394E8dd61Dd70897E9c80be8de7C64A895,,
aave,0xac140648435d03f784879cd789130F22Ef588Fcd,,
rugfun,0xAC5D18e17267Df1D6fdf7E76F974f3a405fE14f1,,
decent,0xAcCC1fe6537eb8EB56b31CcFC48Eb9363e8dd32E,,
qidao,0xAd95A5fE898679B927C266eB2eDfAbC7fe268C27,,
extrafinance,0xB04A484387a7242339DA615A63D2d49D8968aaDa,,
drpc,0xB12C13975A4e928BC09432Dbd1eD3fd832Bf99e5,,
worldmobile,0xB539e34936b0160A9c3b1E449f368e5942a9244C,,
blast,0xb8950c47e8b9e539601cb47a167de8bf4cb1289e,,
unifra,0xbDC205d09D602eCe9F2cc341F3CD02b045965A4d,,
19 changes: 19 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement7.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
flipsidecrypto,0xC2f41b3a1FF28Fd2A6EeE76EE12e51482fcFd11F,,
flipside,0xC2f41b3a1FF28Fd2A6EeE76EE12e51482fcFd11F,,
balancer,0xC40DCFB13651e64C8551007aa57F9260827B6462,,
goldsky,0xC439D9737f2f5CB2a25d28d63e0a943bCa033384,,
definitive,0xc50932eDd1c14272AA35324dfC45A19Ec57839Aa,,
bifrost,0xcBB837942598089392555d93B22faCdFC990f197,,
refraction,0xCBfa3c438EBb86FF17b075a0a0b6f15a08DAFEA8,,
compound,0xCC3E7c85Bb0EE4f09380e041fee95a0caeDD4a02,,
jojo,0xD0cFCf1899A749bf0398fc885DB7ee0479C05eFC,,
quicknode,0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6,,
bountycaster,0xD5064bD244138fa4Ff1b9048D165491889af5C15,,
apedotstore,0xd52b1994E745c0eE5Bc7AD41414Da7d9E0815b66,,
zklink,0xDC92D828A4B68110E8DA2d88C0bA42F4036b7289,,
astaria,0xde032b9654a037F2976480DC2a89150a608F155a,,
morphex,0xE02Fb5C70aF32F80Aa7F9E8775FE7F12550348ec,,
redstone,0xe6B210F1299a3B0D74BfA24D678A9dC1e2a27e34,,
friendtech,0xE764dA9bDeA91d845AAc2C7D53A8DfE59A369095,,
dena,0xE7DEd29c38728Bb49A9CF71c3a274088bc51649A,,
blockdaemon,0xeA5E01513e237D7aC72de5F0a5401e4FFcb567F2,,
19 changes: 19 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/disbursement8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tokenterminal,0xeB67e286faf667A047e435EC90107122b0bC2C01,,
partydao,0xEdDeb6f119cbFE24741a6333Dc69BffFCBD1dCA1,,
dhedge,0xEE27793EBAf6a446c74C2cDd23Bba615e9472264,,
cyberconnect,0xF18fE4dbA52E862C394924AC4E7F4b744ef1FAC0,,
titles,0xF2254525E9f2147990279BA450fb23432040dfdd,,
privy,0xF2A919977c6dE88dd8ed90feAADFcC5d65D66038,,
pancakeswap,0xf2Bb8d4f27028b8B8340B4e2C64Baa101C9Af46B,,
fwb,0xf34292eB10BE9cB62be70bA2058e0d683839DaBC,,
zeroex,0xf36b9f50E59870A24F42F9Ba43b2aD0A4b8f2F51,,
burve,0xF3d5CAd1B841a1B3f0F9b7AD9a1262491418a414,,
unlonely,0xf6B640ED09927C90185D3a7aF4b186317Cc8df3e,,
arpanetwork,0xf7A8f04C7fE7C8A6ED692Bdf5EE1658559cbE7Dc,,
sushiswap,0xFcD4e19Dd044cBa929cF1EEfc1C181aE4f5beCe8,,
optimism,0xFD99F59D3A446744E820D67b429fA2416780237c,,
opx,0xFD99F59D3A446744E820D67b429fA2416780237c,,
levitate,0xFe754e81f888E49Ca940dFD94A65dEc007874F69,,
mempool,0xFee13e85D30EEF68D2B279B35b85E05A2853367C,,
ljbrock,0x2Fc5d43245f0176E9816166586aE478F0AA0921f,,
dwr,0xD7029BDEa1c17493893AAfE29AAD69EF892B8ff2,,
16 changes: 16 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[profile.default]
src = 'src'
out = 'out'
libs = ['lib']
broadcast = 'records'
fs_permissions = [ {access = "read-write", path = "./"} ]
optimizer = true
optimizer_runs = 999999
solc_version = "0.8.23"
via-ir = true
remappings = [
'@base-contracts/=lib/base-contracts',
'basenames/=lib/basenames/src/'
]

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
8 changes: 8 additions & 0 deletions mainnet/2024-08-27-disburse-basenames/parser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
jq -Rsn '
{"singles":
[inputs
| . / "\n"
| (.[] | select(length > 0) | . / ",") as $input
| {"name": $input[0], "addr": $input[1]}]}
' <$1 > disbursement.json

Large diffs are not rendered by default.

Loading