{"id":23545512,"url":"https://github.com/bh2smith/subsafe-commander","last_synced_at":"2025-05-15T10:34:38.486Z","repository":{"id":61590270,"uuid":"456854731","full_name":"bh2smith/subsafe-commander","owner":"bh2smith","description":"A collection of scripts for executing transactions from Safe on behalf of a family of Sub-Safes","archived":false,"fork":false,"pushed_at":"2024-12-08T18:58:41.000Z","size":234,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T10:47:59.553Z","etag":null,"topics":["airdrop","claim","hacktoberfest","multisend","safe","safe-token"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bh2smith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T08:57:12.000Z","updated_at":"2024-12-08T18:58:42.000Z","dependencies_parsed_at":"2023-01-22T03:17:01.958Z","dependency_job_id":"38228c90-c8c4-409e-bb01-252a5c7b6c07","html_url":"https://github.com/bh2smith/subsafe-commander","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fsubsafe-commander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fsubsafe-commander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fsubsafe-commander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fsubsafe-commander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bh2smith","download_url":"https://codeload.github.com/bh2smith/subsafe-commander/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254323194,"owners_count":22051742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airdrop","claim","hacktoberfest","multisend","safe","safe-token"],"created_at":"2024-12-26T08:18:40.006Z","updated_at":"2025-05-15T10:34:38.455Z","avatar_url":"https://github.com/bh2smith.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SubSafe Commander for Safe Transaction Batching\n\nControl your Fleet of safes from the command line! Claim your $SAFE token airdrop in style. \n\n## TLDR;\n\nTo Claim $SAFE Airdrop on behalf of a family of sub-safes (with signing threshold 1) all of which\nare owned by a single \"parent\" safe, do this:\n\nCreate an `.env` file with the following values:\n\n```shell\nNODE_URL=\nPARENT_SAFE=\n# Private key of Parent Owner\nPROPOSER_PK=\nDUNE_API_KEY=\n```\n\nRun the following (full-claim script)\n\n```shell\ndocker run --pull=always -it --rm \\\n  --env-file .env \\\n  ghcr.io/bh2smith/subsafe-commander:main \\\n  --command CLAIM \\\n  --parent $PARENT_SAFE\n```\n\nIf you don't have a `DUNE_API_KEY`, you can also provide an additional argument `--sub-safes` with a\ncomma separated list of safes owned by `$PARENT_SAFE`.\n\n## Find your Sub-Safes\n\nFor example, the following dune query shows \"fleets\" of Safes owned by a single parent\n(this is not a comprehensive list)\n\nFor all fleets on all networks check\nhere: [https://dune.com/queries/1436503](https://dune.com/queries/1436503)\n\n## General Usage\n\nWith environment variables\n\n```shell\n# General defaults\nNODE_URL=https://rpc.ankr.com/eth\nINDEX_FROM=0\nNUM_SAFES=90 \u003c-- This is the CAP.\n# Must be provided\nPARENT_SAFE=\n# Private key of Parent Owner\nPROPOSER_PK=\nDUNE_API_KEY=\n```\n\nthis project exposes the following contract method calls:\n\n```shell\ndocker run --pull=always -it --rm \\\n  --env-file .env \\\n  ghcr.io/bh2smith/subsafe-commander:main \\\n  --command $COMMAND \\\n  --parent $PARENT_SAFE \\\n  --index-from $INDEX_FROM \\ \n  --num-safes $NUM_SAFES \\\n  [--sub-safes SUB_SAFES]\n```\n\nwith currently supported commands\n\n```shell\n--command {CLAIM,ADD_OWNER,setDelegate,clearDelegate}\n```\n\nNote that `--sub-safes` is optional. If not provided then a `DUNE_API_KEY` will be expected (to\nfetch them).\n\n## Safe: Add Owner\n\nRequires additional arguments `--new-owner NEW_OWNER`\n\n## Airdrop\n\nIndividual commands are supported as well as \"Full Claim\" (--command FullClaim)\nwhich combines delegate, redeem and claim into a single transaction.\nNote: that this is **not** recommended for more than 26 SubSafes at a time\n\n#### Redeem\n\nRequires no additional arguments. Note that no token transfers are expected to occur during\nredemption, these happen on claim (and claim comes after redeem).\n\n#### Claim\n\nRequires no additional arguments. It sets the beneficiary of the SAFE tokens to `$PARENT_SAFE`.\n\n#### Examples\n\n- REDEEM with 5\n  sub-safes: [0x0b1af8434e9ac016f4412f12c87bfd7b3a05ca3f0d23ac60b263aaf42a76db4a](https://etherscan.io/tx/0x0b1af8434e9ac016f4412f12c87bfd7b3a05ca3f0d23ac60b263aaf42a76db4a)\n- CLAIM with 5\n  sub-safes: [0xa3cf9ad343d167d1036d466733727713af0c730ce4dd9032168439448031c0d1](https://etherscan.io/tx/0xa3cf9ad343d167d1036d466733727713af0c730ce4dd9032168439448031c0d1)\n- REDEEM with 75\n  sub-safes: [0x8f14a5681e805b5ab6e7d7d62393fa37de594c17b8d0d6563adaf7f7150d6377](https://etherscan.io/tx/0x8f14a5681e805b5ab6e7d7d62393fa37de594c17b8d0d6563adaf7f7150d6377)\n\nFor more examples, see some gas\nbenchmarking [here](https://github.com/bh2smith/subsafe-commander/issues/4)\n\n### Full Claim\n\nThis project also supports a full claim cycle, which is the combination of (delegate, redeem and\nclaim). However, due to gas limitations this is restricted to a maximum of 30 safes.\n\n## Snapshot\n\n#### setDelegate\n\nRequires no additional arguments. It sets the delegate of \"safe.eth\" namespace to `$PARENT_SAFE`.\n\n#### clearDelegate\n\nRequires no additional arguments.\n\n# Installation \u0026 Local Development\n\n```shell\npython3 -m .venv .venv\nsource ./.venv/bin/activate\npip install -r requirements.txt\ncp .env.sample .env    \u003c----- Copy your Dune credentials here!\n```\n\n## Run Tests\n\n```shell\npython -m pytest tests\n```\n\n## Docker\n\n### Build Locally \u0026 Run\n\n```shell\ngit clone git@github.com:bh2smith/subsafe-commander.git\ncd subsafe-commander\ndocker build . -t subsafe-commander\ndocker run -it --rm --env-file .env --command $COMMAND --parent $PARENT_SAFE --index-from $INDEX_FROM --num-safes $NUM_SAFES\n```\n\n### Pull From Anywhere \u0026 Run\n\n```shell\ndocker run --pull=always -it --rm \\\n  --env-file .env \\\n  ghcr.io/bh2smith/subsafe-commander:main \\\n  --command $COMMAND \\\n  --parent $PARENT_SAFE \\\n  --index-from $INDEX_FROM \\\n  --num-safes $NUM_SAFES\n```\n\nNote, this commands expects you to have a `.env` file in your present working directory!\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbh2smith%2Fsubsafe-commander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbh2smith%2Fsubsafe-commander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbh2smith%2Fsubsafe-commander/lists"}