{"id":15926797,"url":"https://github.com/zemse/sunflower","last_synced_at":"2026-03-17T18:03:22.040Z","repository":{"id":183163540,"uuid":"669263657","full_name":"zemse/sunflower","owner":"zemse","description":"🌻 use L1 multisig owners to sign on L2 multisigs using zk proofs","archived":false,"fork":false,"pushed_at":"2023-07-25T18:09:08.000Z","size":319,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-27T23:47:28.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/zemse.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":"2023-07-21T18:52:38.000Z","updated_at":"2025-05-08T05:53:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"14fae2ba-c79f-426f-a389-68c3fde99406","html_url":"https://github.com/zemse/sunflower","commit_stats":null,"previous_names":["zemse/sunflower"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zemse/sunflower","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fsunflower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fsunflower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fsunflower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fsunflower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zemse","download_url":"https://codeload.github.com/zemse/sunflower/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fsunflower/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-06T22:42:05.480Z","updated_at":"2026-03-17T18:03:22.006Z","avatar_url":"https://github.com/zemse.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Trustless-3 copy](https://github.com/zemse/sunflower/assets/22412996/ae804c27-8be9-4d2b-bf05-203e9d3a5fc8)\n\n# sunflower\n\nthis project is a gnosis safe plugin that is used by a multi-sig on L2 to inherit ownership of a multi-sig on L1.\n\nethglobal submission link: https://ethglobal.com/showcase/sunflower-ogbj9\n\nthe optimism L2 has a precompile which gives access to L1's block hash. this allows access to the execution details of L1. however, doing MPT proofs + RLP can be costly in terms of computation and call data size. hence, in this hack, i am using open-source code developed by the axiom team, along with some modifications to provide a zk proof of storage slots given a block hash.\n\n## server\n\na rocket-rs backend server which accepts REST API requests for the endpoint `/gen_proof?address=\u003cL1-multisig\u003e` that generates proofs given an address of L1 gnosis multi-sig. from the multisig address, the storage slot keys are calculated based on the storage layout of gnosis multisig (which uses a mapping) and then these are used with axiom circuits to generate a proof of its value. \n\nto run the backend server:\n\n```\ncd server\n\nPROVER_PRIVATE_KEY=\u003ckey with some optimism eth\u003e DEBUG=true OPTIMISM_RPC_URL=\u003coptimism rpc url\u003e  JSON_RPC_URL=\u003ceth mainnet rpc url\u003e cargo run --release\n```\n\n## contracts\n\nthis is solidity code that parses the proofs and the plugin business logic. there is a `OptimismBlockCache` contract which is called everytime prover is generating proof to pin the L1 block hash on optimism L2 network so it is accessable when user is verifying the proof. the `SunflowerSafePlugin` uses the plonk verifier generated through axiom circuits to check if the proof is valid and then parses the public instances to get owner list and threshold. following that the ordinary signature verification code from gnosis safe contracts is used. \n\nto run the test cases:\n\n```\ncd contracts\n\nforge test\n```\n\nfor deploying contracts i've just used `forge flatten \u003cpath\u003e` + remix.\n\n## running the frontend\n\ndemo UI to interact with the plugin on an optimism L2 multi-sig. frontend depends rust backend for generating a proof. cors checks are required to be disabled in the browser bcz i didn't have time to deal with fixing cors during hackathon.\n\n```\ncd frontend\n\nyarn start\n```\n\n## license\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fsunflower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzemse%2Fsunflower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fsunflower/lists"}