Artifacts
DISCLAIMER // NFA // DYOR
This analysis is based on observations of the contract behavior. We are not smart contract security experts. This document aims to explain what the contract appears to do based on the code. It should not be considered a comprehensive security audit or financial advice. Always verify critical information independently and consult with blockchain security professionals for important decisions.
⊙ generated by robots | curated by humans
| METADATA | |
|---|---|
| Contract Address | 0x00a9F390...0d25BA (etherscan) |
| Network | Ethereum Mainnet |
| Analysis Date | 2026-11-27 |
Runtime Bytecode
The deployed App bytecode, 7,154 bytes. Identical on Base (basescan), with the same keccak256 of the code on both chains.
Source: Etherscan - Contract Code
Command:
Artifact:
0x608060405260033611610010575f80fd5b5f3560e01c806310b744bf14610cce5780631374c46014610a995780632569296214610a50578063328f9c5814610a1f57806332ee2d4e1461097257806333c34ac31461095757806354d1f13d1461091357806354fd4d50146108495780635a2bc22d1461080957806366b9eeef1461070a578063700e4707146106d7578063715018a61461068e578063788bc78c146104895780638da5cb5b1461045f578063963870e61461043d578063a1b43c9214610372578063c106800d14610355578063cf30901214610330578063dd473fae146102f6578063f04e283e1461029e578063f2fde38b14610256578063f83d08ba1461017d578063f91f0937146101615763fee81cf414610120575f80fd5b3461015d57602036600319011261015d576004356001600160a01b038116810361015d5763389a75e1600c525f52602080600c2054604051908152f35b5f80fd5b3461015d575f36600319011261015d5760205f54604051908152f35b3461015d575f36600319011261015d576101956119db565b5f54801561022e575f5b818110610211576001545f5b8181106101e75761010061ff001960025416176002557ff5f78dc41fc69b79b9b2a94261ec3893c10df53e1594a2a503d0857b2f7e8a965f80a1005b8061020b6001600160a01b036101fe600194610f04565b90549060031b1c166119f7565b016101ab565b806102286001600160a01b036101fe600194610f30565b0161019f565b7f62c33689000000000000000000000000000000000000000000000000000000005f5260045ffd5b602036600319011261015d576004356001600160a01b038116810361015d5761027d6119db565b8060601b156102915761028f90611b7e565b005b637448fbae5f526004601cfd5b602036600319011261015d576004356001600160a01b038116810361015d576102c56119db565b63389a75e1600c52805f526020600c2090815442116102e9575f61028f9255611b7e565b636f5e88185f526004601cfd5b3461015d575f36600319011261015d5760206040517f35323139000000000000000000000000000000000000000000000000000000008152f35b3461015d575f36600319011261015d57602060ff60025460081c166040519015158152f35b3461015d575f36600319011261015d576020600154604051908152f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576103a3903690600401610f5b565b906103ac6119db565b60ff60025460081c16610415576103ca6103cf916020933691610e7c565b611a9f565b6103d881611041565b7f9e038aa3cd3973ba0d7d6f9cbe4d615e030175481125ccd32c6f47d675c39d8282600154604051908152a16001600160a01b0360405191168152f35b7f0f2e5b6c000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461015d575f36600319011261015d57602060ff600254166040519015158152f35b3461015d575f36600319011261015d576020638b78c6d819546001600160a01b0360405191168152f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576104ba903690600401610f5b565b6104c26119db565b60ff60025460081c166104155767ffffffffffffffff811161067a576104e9600354610f89565b601f811161061a575b505f91601f821160011461057657604090827f0136bab3bb97ec20202d041d92d29717da8abc53e056d2f625916194af9060ac945f9161056b575b508360011b905f198560031b1c1916176003555b82825193849260208452816020850152848401375f828201840152601f01601f19168101030190a1005b90508101358561052d565b601f19821660035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b905f5b8181106106025750907f0136bab3bb97ec20202d041d92d29717da8abc53e056d2f625916194af9060ac948460409493106105e9575b5050600183811b01600355610541565b8201355f19600386901b60f8161c1916905584806105d9565b838601358355602095860195600190930192016105a3565b818111156104f25761066c9060035f52601f830160051c9060208410610672575b601f82910160051c03907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610fc1565b826104f2565b5f915061063b565b634e487b7160e01b5f52604160045260245ffd5b5f36600319011261015d576106a16119db565b5f638b78c6d819547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a35f638b78c6d81955005b3461015d575f36600319011261015d576107066106f2611add565b604051918291602083526020830190610ee0565b0390f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d5761073b903690600401610df5565b906107446119db565b60ff60025460081c1661041557811561022e576001545f600155806107d5575b505f5b82811061079b577f9e038aa3cd3973ba0d7d6f9cbe4d615e030175481125ccd32c6f47d675c39d82602084604051908152a1005b806107b96107b46107af6001948787610fdc565b610fec565b6119f7565b6107cf6107ca6107af838787610fdc565b611041565b01610767565b60015f52610803907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6610fc1565b82610764565b3461015d57602036600319011261015d576004355f5481101561015d576001600160a01b03610839602092610f30565b90549060031b1c16604051908152f35b3461015d575f36600319011261015d576040515f60035461086981610f89565b80845290600181169081156108ef5750600114610891575b610706836106f281850382610e42565b91905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f905b8082106108d5575090915081016020016106f2610881565b9192600181602092548385880101520191019092916108bd565b60ff191660208086019190915291151560051b840190910191506106f29050610881565b5f36600319011261015d5763389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2005b3461015d575f36600319011261015d576107066106f26113fc565b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576109a3903690600401610f5b565b906109ac6119db565b60ff60025460081c16610415576103ca6109ca916020933691610e7c565b6109d381611000565b5f546002546040805192835260ff909116151560208301527fcb110259ddbdfff0885c2e5734db7d6f4b373052995df37bd665133fd92d982f91a16001600160a01b0360405191168152f35b3461015d57602036600319011261015d5760043560015481101561015d576001600160a01b03610839602092610f04565b5f36600319011261015d5763389a75e1600c52335f526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a2005b3461015d57604036600319011261015d5760043567ffffffffffffffff811161015d573660238201121561015d578060040135610ad581610e64565b91610ae36040519384610e42565b8183526024602084019260051b8201019036821161015d5760248101925b828410610c9e578460243567ffffffffffffffff811161015d573660238201121561015d5780600401359060246020610b3984610e64565b610b466040519182610e42565b848152019260051b8201019036821161015d5760248101925b828410610c125761ffff610b92610b75876110fd565b919290604051948594168452606060208501526060840190610ee0565b8281036040840152815180825260208201916020808360051b8301019401925f915b838310610bc15786860387f35b919395509193602080610c00600193601f1986820301875289519083610bf08351604084526040840190610ee0565b9201519084818403910152610ee0565b97019301930190928695949293610bb4565b833567ffffffffffffffff811161015d5782016040602319823603011261015d5760405191610c4083610e26565b602482013567ffffffffffffffff811161015d57610c649060243691850101610ec2565b835260448201359267ffffffffffffffff841161015d57610c8f602094936024869536920101610ec2565b83820152815201930192610b5f565b833567ffffffffffffffff811161015d57602091610cc3839260243691870101610ec2565b815201930192610b01565b3461015d57604036600319011261015d5760043567ffffffffffffffff811161015d57610cff903690600401610df5565b6024359081151580830361015d57610d156119db565b60ff60025460081c1661041557811561022e575f545f805580610dc2575b505f5b828110610d9257507fcb110259ddbdfff0885c2e5734db7d6f4b373052995df37bd665133fd92d982f935060ff801960025416911617600255610d8d60405192839283909291602090604083019483521515910152565b0390a1005b80610da66107b46107af600194878a610fdc565b610dbc610db76107af83878a610fdc565b611000565b01610d36565b5f8052610def907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563610fc1565b84610d33565b9181601f8401121561015d5782359167ffffffffffffffff831161015d576020808501948460051b01011161015d57565b6040810190811067ffffffffffffffff82111761067a57604052565b90601f8019910116810190811067ffffffffffffffff82111761067a57604052565b67ffffffffffffffff811161067a5760051b60200190565b92919267ffffffffffffffff821161067a5760405191610ea6601f8201601f191660200184610e42565b82948184528183011161015d578281602093845f960137010152565b9080601f8301121561015d57816020610edd93359101610e7c565b90565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600154811015610f1c5760015f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f54811015610f1c575f805260205f2001905f90565b8054821015610f1c575f5260205f2001905f90565b9181601f8401121561015d5782359167ffffffffffffffff831161015d576020838186019501011161015d57565b90600182811c92168015610fb7575b6020831014610fa357565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610f98565b5f5b828110610fcf57505050565b5f82820155600101610fc3565b9190811015610f1c5760051b0190565b356001600160a01b038116810361015d5790565b5f546801000000000000000081101561067a5780600161102392015f555f610f46565b6001600160a01b0380839493549260031b9316831b921b1916179055565b6001546801000000000000000081101561067a5780600161102392016001556001610f46565b805115610f1c5760200190565b604080519091906110858382610e42565b6001815291601f1901825f5b82811061109d57505050565b6020906040516110ac81610e26565b6060815260608382015282828501015201611091565b604051906110d1604083610e42565b600c82527f436f6e74656e742d5479706500000000000000000000000000000000000000006020830152565b80518015908115611321575b506112a95760018151149081611230575b5080611225575b61118057604051611133602082610e42565b5f81525f805b81811061115b57505061019491604051611154602082610e42565b5f81529190565b60209060405161116a81610e26565b6060815260608382015282828601015201611139565b611188611074565b60405161119481610e26565b61119c6110c2565b81526040516111ac606082610e42565b602581527f6170706c69636174696f6e2f6a6176617363726970743b20636861727365743d60208201527f7574662d380000000000000000000000000000000000000000000000000000006040820152602082015261120a82611067565b5261121481611067565b5061121d611add565b9160c8929190565b506001541515611121565b6112a3915061123e90611067565b516040519061124e604083610e42565b600982527f7769646765742e6a73000000000000000000000000000000000000000000000060209283015280519101207f154f9911eca37cfcacadbaa4392d5e86047f81e6e4881b878b5b261551f2449a1490565b5f61111a565b506112b2611074565b6040516112be81610e26565b6112c66110c2565b81526040516112d6604082610e42565b601881527f746578742f68746d6c3b20636861727365743d7574662d3800000000000000006020820152602082015261130e82611067565b5261131881611067565b5061121d6113fc565b600191501480611332575b5f611109565b5061138061133f82611067565b516040519061134f602083610e42565b5f90915280516020909101207fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b8061132c57506113f761139282611067565b51604051906113a2604083610e42565b600a82527f696e6465782e68746d6c0000000000000000000000000000000000000000000060209283015280519101207f4d17a49e3c76c3b41120af8c4783bab04c2b6d39df6a3ce92620c5050fbed6d11490565b61132c565b6060805f545f905b80821061194b5750505060ff6002541615610edd578060609181519081611841575b505050610edd61023460916020936040519485917f3c21444f43545950452068746d6c3e3c68746d6c3e3c686561643e3c6d657461828401527f20636861727365743d227574662d38223e3c7469746c653e6170703c2f74697460408401527f6c653e3c2f686561643e3c626f64793e3c7363726970743e000000000000000060608401527f286173796e6328293d3e7b636f6e737420623d61746f6228220000000000000060788401528051918291018484015e81017f22293b0000000000000000000000000000000000000000000000000000000000838201527f636f6e737420753d6e65772055696e7438417272617928622e6c656e6774682960948201527f3b666f72286c657420693d303b693c622e6c656e6774683b692b2b29755b695d60b48201527f3d622e63686172436f646541742869293b00000000000000000000000000000060d48201527f636f6e737420743d6177616974206e657720526573706f6e7365286e6577204260e58201527f6c6f62285b755d292e73747265616d28292e706970655468726f756768286e656101058201527f77204465636f6d7072657373696f6e53747265616d2827677a6970272929292e6101258201527f7465787428293b000000000000000000000000000000000000000000000000006101458201527f636f6e737420643d6e657720444f4d50617273657228292e706172736546726f61014c8201527f6d537472696e6728742c27746578742f68746d6c27293b00000000000000000061016c8201527f646f63756d656e742e7265706c6163654368696c6428646f63756d656e742e696101838201527f6d706f72744e6f646528642e646f63756d656e74456c656d656e742c747275656101a38201527f292c646f63756d656e742e646f63756d656e74456c656d656e74293b000000006101c38201527f666f7228636f6e73742073206f665b2e2e2e646f63756d656e742e71756572796101df8201527f53656c6563746f72416c6c282773637269707427295d297b636f6e7374206e3d6101ff8201527f646f63756d656e742e637265617465456c656d656e742827736372697074272961021f8201527f3b0000000000000000000000000000000000000000000000000000000000000061023f8201527f666f7228636f6e73742061206f6620732e61747472696275746573296e2e73656102408201527f7441747472696275746528612e6e616d652c612e76616c7565293b00000000006102608201527f6e2e74657874436f6e74656e743d732e74657874436f6e74656e743b732e726561027b8201527f706c61636557697468286e293b7d7d2928293b0000000000000000000000000061029b8201527f3c2f7363726970743e3c2f626f64793e3c2f68746d6c3e0000000000000000006102ae8201520301610214810184520182610e42565b909192506003600283010460021b916040517f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526106707f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f18603f5260208101938082019460208481880198010190600460038351975f85525b0191603f8351818160121c16515f538181600c1c1651600153818160061c165160025316516003535f5181520190888210156118fe576004906003906118bd565b50602097507f3d3d00000000000000000000000000000000000000000000000000000000000060036091966040610edd9a6102349a5f975201604052066002048203525281529350611426565b909193926001906119d16001600160a01b03611967865f610f46565b90549060031b1c1687602060405180935f19813b0164ffffffffff16905f6021830191601f8501903c8082520192816040850196876040528051918291018587015e8401908382015f8152815193849201905e01015f815203605f1981018352603f190182610e42565b9394920190611404565b638b78c6d8195433036119ea57565b6382b429005f526004601cfd5b803b60015f80843c5f519015611a6a575f1a60f81b7fff0000000000000000000000000000000000000000000000000000000000000016611a355750565b6001600160a01b03907f449e1ab9000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001600160a01b03827fef9230eb000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b9081518060401b6bfe61000180600a3d393df3000161fffe8211840152600b8101601584015ff0928315611ad05752565b63301164255f526004601cfd5b6060906001545f905b808210611af1575050565b9092600190611b766001600160a01b03611b0b8785610f46565b90549060031b1c166060602060405180935f19813b0164ffffffffff16905f6021830191601f8501903c8082520192816040850196876040528051918291018587015e8401908382015f8152815193849201905e01015f815203605f1981018352603f190182610e42565b930190611ae6565b6001600160a01b031680638b78c6d819547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3638b78c6d8195556fea2646970667358221220d04a1ff2bdd707479a5beaf47a89b982f68dad1fdbead207c736a397c096ba1d64736f6c63430008260033
Creation Transaction Input
The input of the creation transaction sent to the Deterministic Deployment Proxy 0x4e59b448...B4956C (etherscan): the 32-byte salt 0x87cdf85b...ead3f2 followed by the 7,909-byte init code. The last 128 bytes of the init code are the constructor arguments: the owner 0x00c0e887...1F3790 (etherscan) and the string v0.1.
Source: Etherscan - Creation TX
Command:
Artifact:
0x87cdf85b31cb82e688a11bbb8cf4c0249648f7dc2e5bec932424960920ead3f260806040523461024957611e65803803806100198161024d565b9283398101906040818303126102495780516001600160a01b0381169190829003610249576020810151906001600160401b038211610249570182601f82011215610249578051906001600160401b03821161023557610082601f8301601f191660200161024d565b938285526020838301011161024957815f9260208093018387015e8401015280638b78c6d819555f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a380516001600160401b03811161023557600354600181811c9116801561022b575b602082101461021757601f81116101a9575b50602091601f8211600114610149579181925f9261013e575b50508160011b915f199060031b1c1916176003555b604051611bf290816102738239f35b015190505f8061011a565b601f1982169260035f52805f20915f5b85811061019157508360019510610179575b505050811b0160035561012f565b01515f1960f88460031b161c191690555f808061016b565b91926020600181928685015181550194019201610159565b818111156101015760035f52601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b6020841061020f575b81601f9101920160051c03905f5b828110610202575050610101565b5f828201556001016101f4565b5f91506101e6565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100ef565b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102355760405256fe608060405260033611610010575f80fd5b5f3560e01c806310b744bf14610cce5780631374c46014610a995780632569296214610a50578063328f9c5814610a1f57806332ee2d4e1461097257806333c34ac31461095757806354d1f13d1461091357806354fd4d50146108495780635a2bc22d1461080957806366b9eeef1461070a578063700e4707146106d7578063715018a61461068e578063788bc78c146104895780638da5cb5b1461045f578063963870e61461043d578063a1b43c9214610372578063c106800d14610355578063cf30901214610330578063dd473fae146102f6578063f04e283e1461029e578063f2fde38b14610256578063f83d08ba1461017d578063f91f0937146101615763fee81cf414610120575f80fd5b3461015d57602036600319011261015d576004356001600160a01b038116810361015d5763389a75e1600c525f52602080600c2054604051908152f35b5f80fd5b3461015d575f36600319011261015d5760205f54604051908152f35b3461015d575f36600319011261015d576101956119db565b5f54801561022e575f5b818110610211576001545f5b8181106101e75761010061ff001960025416176002557ff5f78dc41fc69b79b9b2a94261ec3893c10df53e1594a2a503d0857b2f7e8a965f80a1005b8061020b6001600160a01b036101fe600194610f04565b90549060031b1c166119f7565b016101ab565b806102286001600160a01b036101fe600194610f30565b0161019f565b7f62c33689000000000000000000000000000000000000000000000000000000005f5260045ffd5b602036600319011261015d576004356001600160a01b038116810361015d5761027d6119db565b8060601b156102915761028f90611b7e565b005b637448fbae5f526004601cfd5b602036600319011261015d576004356001600160a01b038116810361015d576102c56119db565b63389a75e1600c52805f526020600c2090815442116102e9575f61028f9255611b7e565b636f5e88185f526004601cfd5b3461015d575f36600319011261015d5760206040517f35323139000000000000000000000000000000000000000000000000000000008152f35b3461015d575f36600319011261015d57602060ff60025460081c166040519015158152f35b3461015d575f36600319011261015d576020600154604051908152f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576103a3903690600401610f5b565b906103ac6119db565b60ff60025460081c16610415576103ca6103cf916020933691610e7c565b611a9f565b6103d881611041565b7f9e038aa3cd3973ba0d7d6f9cbe4d615e030175481125ccd32c6f47d675c39d8282600154604051908152a16001600160a01b0360405191168152f35b7f0f2e5b6c000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461015d575f36600319011261015d57602060ff600254166040519015158152f35b3461015d575f36600319011261015d576020638b78c6d819546001600160a01b0360405191168152f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576104ba903690600401610f5b565b6104c26119db565b60ff60025460081c166104155767ffffffffffffffff811161067a576104e9600354610f89565b601f811161061a575b505f91601f821160011461057657604090827f0136bab3bb97ec20202d041d92d29717da8abc53e056d2f625916194af9060ac945f9161056b575b508360011b905f198560031b1c1916176003555b82825193849260208452816020850152848401375f828201840152601f01601f19168101030190a1005b90508101358561052d565b601f19821660035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b905f5b8181106106025750907f0136bab3bb97ec20202d041d92d29717da8abc53e056d2f625916194af9060ac948460409493106105e9575b5050600183811b01600355610541565b8201355f19600386901b60f8161c1916905584806105d9565b838601358355602095860195600190930192016105a3565b818111156104f25761066c9060035f52601f830160051c9060208410610672575b601f82910160051c03907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610fc1565b826104f2565b5f915061063b565b634e487b7160e01b5f52604160045260245ffd5b5f36600319011261015d576106a16119db565b5f638b78c6d819547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a35f638b78c6d81955005b3461015d575f36600319011261015d576107066106f2611add565b604051918291602083526020830190610ee0565b0390f35b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d5761073b903690600401610df5565b906107446119db565b60ff60025460081c1661041557811561022e576001545f600155806107d5575b505f5b82811061079b577f9e038aa3cd3973ba0d7d6f9cbe4d615e030175481125ccd32c6f47d675c39d82602084604051908152a1005b806107b96107b46107af6001948787610fdc565b610fec565b6119f7565b6107cf6107ca6107af838787610fdc565b611041565b01610767565b60015f52610803907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6610fc1565b82610764565b3461015d57602036600319011261015d576004355f5481101561015d576001600160a01b03610839602092610f30565b90549060031b1c16604051908152f35b3461015d575f36600319011261015d576040515f60035461086981610f89565b80845290600181169081156108ef5750600114610891575b610706836106f281850382610e42565b91905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f905b8082106108d5575090915081016020016106f2610881565b9192600181602092548385880101520191019092916108bd565b60ff191660208086019190915291151560051b840190910191506106f29050610881565b5f36600319011261015d5763389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2005b3461015d575f36600319011261015d576107066106f26113fc565b3461015d57602036600319011261015d5760043567ffffffffffffffff811161015d576109a3903690600401610f5b565b906109ac6119db565b60ff60025460081c16610415576103ca6109ca916020933691610e7c565b6109d381611000565b5f546002546040805192835260ff909116151560208301527fcb110259ddbdfff0885c2e5734db7d6f4b373052995df37bd665133fd92d982f91a16001600160a01b0360405191168152f35b3461015d57602036600319011261015d5760043560015481101561015d576001600160a01b03610839602092610f04565b5f36600319011261015d5763389a75e1600c52335f526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a2005b3461015d57604036600319011261015d5760043567ffffffffffffffff811161015d573660238201121561015d578060040135610ad581610e64565b91610ae36040519384610e42565b8183526024602084019260051b8201019036821161015d5760248101925b828410610c9e578460243567ffffffffffffffff811161015d573660238201121561015d5780600401359060246020610b3984610e64565b610b466040519182610e42565b848152019260051b8201019036821161015d5760248101925b828410610c125761ffff610b92610b75876110fd565b919290604051948594168452606060208501526060840190610ee0565b8281036040840152815180825260208201916020808360051b8301019401925f915b838310610bc15786860387f35b919395509193602080610c00600193601f1986820301875289519083610bf08351604084526040840190610ee0565b9201519084818403910152610ee0565b97019301930190928695949293610bb4565b833567ffffffffffffffff811161015d5782016040602319823603011261015d5760405191610c4083610e26565b602482013567ffffffffffffffff811161015d57610c649060243691850101610ec2565b835260448201359267ffffffffffffffff841161015d57610c8f602094936024869536920101610ec2565b83820152815201930192610b5f565b833567ffffffffffffffff811161015d57602091610cc3839260243691870101610ec2565b815201930192610b01565b3461015d57604036600319011261015d5760043567ffffffffffffffff811161015d57610cff903690600401610df5565b6024359081151580830361015d57610d156119db565b60ff60025460081c1661041557811561022e575f545f805580610dc2575b505f5b828110610d9257507fcb110259ddbdfff0885c2e5734db7d6f4b373052995df37bd665133fd92d982f935060ff801960025416911617600255610d8d60405192839283909291602090604083019483521515910152565b0390a1005b80610da66107b46107af600194878a610fdc565b610dbc610db76107af83878a610fdc565b611000565b01610d36565b5f8052610def907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563610fc1565b84610d33565b9181601f8401121561015d5782359167ffffffffffffffff831161015d576020808501948460051b01011161015d57565b6040810190811067ffffffffffffffff82111761067a57604052565b90601f8019910116810190811067ffffffffffffffff82111761067a57604052565b67ffffffffffffffff811161067a5760051b60200190565b92919267ffffffffffffffff821161067a5760405191610ea6601f8201601f191660200184610e42565b82948184528183011161015d578281602093845f960137010152565b9080601f8301121561015d57816020610edd93359101610e7c565b90565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600154811015610f1c5760015f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f54811015610f1c575f805260205f2001905f90565b8054821015610f1c575f5260205f2001905f90565b9181601f8401121561015d5782359167ffffffffffffffff831161015d576020838186019501011161015d57565b90600182811c92168015610fb7575b6020831014610fa357565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610f98565b5f5b828110610fcf57505050565b5f82820155600101610fc3565b9190811015610f1c5760051b0190565b356001600160a01b038116810361015d5790565b5f546801000000000000000081101561067a5780600161102392015f555f610f46565b6001600160a01b0380839493549260031b9316831b921b1916179055565b6001546801000000000000000081101561067a5780600161102392016001556001610f46565b805115610f1c5760200190565b604080519091906110858382610e42565b6001815291601f1901825f5b82811061109d57505050565b6020906040516110ac81610e26565b6060815260608382015282828501015201611091565b604051906110d1604083610e42565b600c82527f436f6e74656e742d5479706500000000000000000000000000000000000000006020830152565b80518015908115611321575b506112a95760018151149081611230575b5080611225575b61118057604051611133602082610e42565b5f81525f805b81811061115b57505061019491604051611154602082610e42565b5f81529190565b60209060405161116a81610e26565b6060815260608382015282828601015201611139565b611188611074565b60405161119481610e26565b61119c6110c2565b81526040516111ac606082610e42565b602581527f6170706c69636174696f6e2f6a6176617363726970743b20636861727365743d60208201527f7574662d380000000000000000000000000000000000000000000000000000006040820152602082015261120a82611067565b5261121481611067565b5061121d611add565b9160c8929190565b506001541515611121565b6112a3915061123e90611067565b516040519061124e604083610e42565b600982527f7769646765742e6a73000000000000000000000000000000000000000000000060209283015280519101207f154f9911eca37cfcacadbaa4392d5e86047f81e6e4881b878b5b261551f2449a1490565b5f61111a565b506112b2611074565b6040516112be81610e26565b6112c66110c2565b81526040516112d6604082610e42565b601881527f746578742f68746d6c3b20636861727365743d7574662d3800000000000000006020820152602082015261130e82611067565b5261131881611067565b5061121d6113fc565b600191501480611332575b5f611109565b5061138061133f82611067565b516040519061134f602083610e42565b5f90915280516020909101207fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b8061132c57506113f761139282611067565b51604051906113a2604083610e42565b600a82527f696e6465782e68746d6c0000000000000000000000000000000000000000000060209283015280519101207f4d17a49e3c76c3b41120af8c4783bab04c2b6d39df6a3ce92620c5050fbed6d11490565b61132c565b6060805f545f905b80821061194b5750505060ff6002541615610edd578060609181519081611841575b505050610edd61023460916020936040519485917f3c21444f43545950452068746d6c3e3c68746d6c3e3c686561643e3c6d657461828401527f20636861727365743d227574662d38223e3c7469746c653e6170703c2f74697460408401527f6c653e3c2f686561643e3c626f64793e3c7363726970743e000000000000000060608401527f286173796e6328293d3e7b636f6e737420623d61746f6228220000000000000060788401528051918291018484015e81017f22293b0000000000000000000000000000000000000000000000000000000000838201527f636f6e737420753d6e65772055696e7438417272617928622e6c656e6774682960948201527f3b666f72286c657420693d303b693c622e6c656e6774683b692b2b29755b695d60b48201527f3d622e63686172436f646541742869293b00000000000000000000000000000060d48201527f636f6e737420743d6177616974206e657720526573706f6e7365286e6577204260e58201527f6c6f62285b755d292e73747265616d28292e706970655468726f756768286e656101058201527f77204465636f6d7072657373696f6e53747265616d2827677a6970272929292e6101258201527f7465787428293b000000000000000000000000000000000000000000000000006101458201527f636f6e737420643d6e657720444f4d50617273657228292e706172736546726f61014c8201527f6d537472696e6728742c27746578742f68746d6c27293b00000000000000000061016c8201527f646f63756d656e742e7265706c6163654368696c6428646f63756d656e742e696101838201527f6d706f72744e6f646528642e646f63756d656e74456c656d656e742c747275656101a38201527f292c646f63756d656e742e646f63756d656e74456c656d656e74293b000000006101c38201527f666f7228636f6e73742073206f665b2e2e2e646f63756d656e742e71756572796101df8201527f53656c6563746f72416c6c282773637269707427295d297b636f6e7374206e3d6101ff8201527f646f63756d656e742e637265617465456c656d656e742827736372697074272961021f8201527f3b0000000000000000000000000000000000000000000000000000000000000061023f8201527f666f7228636f6e73742061206f6620732e61747472696275746573296e2e73656102408201527f7441747472696275746528612e6e616d652c612e76616c7565293b00000000006102608201527f6e2e74657874436f6e74656e743d732e74657874436f6e74656e743b732e726561027b8201527f706c61636557697468286e293b7d7d2928293b0000000000000000000000000061029b8201527f3c2f7363726970743e3c2f626f64793e3c2f68746d6c3e0000000000000000006102ae8201520301610214810184520182610e42565b909192506003600283010460021b916040517f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526106707f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f18603f5260208101938082019460208481880198010190600460038351975f85525b0191603f8351818160121c16515f538181600c1c1651600153818160061c165160025316516003535f5181520190888210156118fe576004906003906118bd565b50602097507f3d3d00000000000000000000000000000000000000000000000000000000000060036091966040610edd9a6102349a5f975201604052066002048203525281529350611426565b909193926001906119d16001600160a01b03611967865f610f46565b90549060031b1c1687602060405180935f19813b0164ffffffffff16905f6021830191601f8501903c8082520192816040850196876040528051918291018587015e8401908382015f8152815193849201905e01015f815203605f1981018352603f190182610e42565b9394920190611404565b638b78c6d8195433036119ea57565b6382b429005f526004601cfd5b803b60015f80843c5f519015611a6a575f1a60f81b7fff0000000000000000000000000000000000000000000000000000000000000016611a355750565b6001600160a01b03907f449e1ab9000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001600160a01b03827fef9230eb000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b9081518060401b6bfe61000180600a3d393df3000161fffe8211840152600b8101601584015ff0928315611ad05752565b63301164255f526004601cfd5b6060906001545f905b808210611af1575050565b9092600190611b766001600160a01b03611b0b8785610f46565b90549060031b1c166060602060405180935f19813b0164ffffffffff16905f6021830191601f8501903c8082520192816040850196876040528051918291018587015e8401908382015f8152815193849201905e01015f815203605f1981018352603f190182610e42565b930190611ae6565b6001600160a01b031680638b78c6d819547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3638b78c6d8195556fea2646970667358221220d04a1ff2bdd707479a5beaf47a89b982f68dad1fdbead207c736a397c096ba1d64736f6c6343000826003300000000000000000000000000c0e88778e3e3d17acaabc7550dec7ab61f37900000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000476302e3100000000000000000000000000000000000000000000000000000000
Verified Source Code
Source code verified on Etherscan as src/App.sol (214 lines), compiled with solc 0.8.38, via-IR, 1,000 optimizer runs, Ethereum Virtual Machine (EVM) version cancun. It imports Solady Ownable, SSTORE2 and Base64, which are in the repository's artifacts/00a9F390...0d25BA/source/ directory and on Etherscan.
Source: Etherscan - Contract Source
Artifact:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
import {Ownable} from "solady/auth/Ownable.sol";
import {SSTORE2} from "solady/utils/SSTORE2.sol";
import {Base64} from "solady/utils/Base64.sol";
/// @title App
/// @notice The dapp and its embeddable widget, hosted by this contract.
/// ERC-8244: `html()` returns the whole document.
/// ERC-5219 / ERC-6944: `request()` serves "/" with a text/html header so web3:// gateways
/// render it at the root, and `request(["widget.js"])` the widget as application/javascript.
/// @dev Two resources, two pointer lists: `chunks` for the dapp and `widgetChunks` for the widget.
/// Each document lives in SSTORE2 chunks, concatenated at read time. If `gzipped`, `html()` wraps
/// the base64 payload in a bootstrap that inflates it client-side with DecompressionStream. The
/// widget is served raw and never wrapped: a `<script src="widget.js">` fetched through a gateway
/// must be plain JavaScript, and the bootstrap is an HTML document a script tag cannot run.
/// `lock()` freezes both lists; it requires the dapp and does not require a widget.
contract App is Ownable {
struct KeyValue {
string key;
string value;
}
address[] public chunks;
address[] public widgetChunks;
bool public gzipped;
bool public locked;
string public version;
event ChunksSet(uint256 count, bool gzipped);
event WidgetChunksSet(uint256 count);
event VersionSet(string version);
event AppLocked();
error Locked();
/// @dev A pointer holding no code. `SSTORE2.read` on one expands memory past any block gas limit,
/// so `html()` and `request()` would run out of gas for every caller.
error CodelessChunk(address ptr);
/// @dev A pointer that holds code but is not an SSTORE2 chunk: its first byte is not the `STOP`
/// `SSTORE2.write` prefixes (`lib/solady/src/utils/SSTORE2.sol:52`). The case that matters is
/// an EIP-7702 delegation designator, `0xef0100‖address`: it has code, so `code.length` admits
/// it, and its key holder can re-point or clear it after `lock()`, changing or breaking what
/// `html()` serves. EIP-3541 means no deployed contract begins with `0xef`, and `SSTORE2.read`
/// discards byte 0, so a pointer that fails this check could never have been read correctly.
error ForeignChunk(address ptr);
/// @dev No pointers at all: `html()` would return an empty document.
error EmptyDocument();
constructor(address owner_, string memory version_) {
_initializeOwner(owner_);
version = version_;
}
/// @dev Every byte of the bootstrap is load-bearing and `test_gzipBootstrap` pins all of it.
/// It swaps the document in with `DOMParser`, not `document.open()`, which orphans an
/// extension wallet's content script. `DOMParser` marks the scripts it builds non-executable,
/// so each is re-created; `replaceWith` runs an inline script synchronously on insertion,
/// which preserves document order for inline, attribute-free scripts and nothing else.
function html() public view returns (string memory) {
bytes memory doc = _raw(chunks);
if (!gzipped) return string(doc);
return string.concat(
'<!DOCTYPE html><html><head><meta charset="utf-8"><title>app</title></head><body><script>',
'(async()=>{const b=atob("',
Base64.encode(doc),
'");',
"const u=new Uint8Array(b.length);for(let i=0;i<b.length;i++)u[i]=b.charCodeAt(i);",
"const t=await new Response(new Blob([u]).stream().pipeThrough(new DecompressionStream('gzip'))).text();",
"const d=new DOMParser().parseFromString(t,'text/html');",
"document.replaceChild(document.importNode(d.documentElement,true),document.documentElement);",
"for(const s of[...document.querySelectorAll('script')]){const n=document.createElement('script');",
"for(const a of s.attributes)n.setAttribute(a.name,a.value);",
"n.textContent=s.textContent;s.replaceWith(n);}})();",
"</script></body></html>"
);
}
/// @notice The widget, as stored: the raw concatenation of `widgetChunks`, never wrapped.
function widget() public view returns (string memory) {
return string(_raw(widgetChunks));
}
function resolveMode() external pure returns (bytes32) {
return "5219";
}
/// @dev An empty `widgetChunks` answers "widget.js" with the same 404 as any unknown path, so an
/// `App` carrying the dapp and no widget is a complete site rather than a broken one.
function request(string[] memory resource, KeyValue[] memory)
external
view
returns (uint16 statusCode, string memory body, KeyValue[] memory headers)
{
bool root = resource.length == 0
|| (resource.length == 1 && (_eq(resource[0], "") || _eq(resource[0], "index.html")));
if (root) {
headers = new KeyValue[](1);
headers[0] = KeyValue("Content-Type", "text/html; charset=utf-8");
return (200, html(), headers);
}
if (resource.length == 1 && _eq(resource[0], "widget.js") && widgetChunks.length != 0) {
headers = new KeyValue[](1);
headers[0] = KeyValue("Content-Type", "application/javascript; charset=utf-8");
return (200, widget(), headers);
}
return (404, "", new KeyValue[](0));
}
/// @notice Store one chunk (<= 24,575 bytes) and append its pointer.
function addChunk(bytes calldata data) external onlyOwner returns (address ptr) {
if (locked) revert Locked();
ptr = SSTORE2.write(data);
chunks.push(ptr);
emit ChunksSet(chunks.length, gzipped);
}
/// @notice Replace the whole pointer list (reuse already-deployed chunks, reorder, or reset).
/// @dev These pointers arrive from calldata, unlike `addChunk`'s, so each must hold code.
function setChunks(address[] calldata ptrs, bool gzipped_) external onlyOwner {
if (locked) revert Locked();
if (ptrs.length == 0) revert EmptyDocument();
delete chunks;
for (uint256 i; i < ptrs.length; ++i) {
_requireChunk(ptrs[i]);
chunks.push(ptrs[i]);
}
gzipped = gzipped_;
emit ChunksSet(ptrs.length, gzipped_);
}
/// @notice Store one widget chunk (<= 24,575 bytes) and append its pointer.
function addWidgetChunk(bytes calldata data) external onlyOwner returns (address ptr) {
if (locked) revert Locked();
ptr = SSTORE2.write(data);
widgetChunks.push(ptr);
emit WidgetChunksSet(widgetChunks.length);
}
/// @notice Replace the whole widget pointer list. No gzip flag: the widget is always raw.
/// @dev These pointers arrive from calldata, unlike `addWidgetChunk`'s, so each must hold code.
function setWidgetChunks(address[] calldata ptrs) external onlyOwner {
if (locked) revert Locked();
if (ptrs.length == 0) revert EmptyDocument();
delete widgetChunks;
for (uint256 i; i < ptrs.length; ++i) {
_requireChunk(ptrs[i]);
widgetChunks.push(ptrs[i]);
}
emit WidgetChunksSet(ptrs.length);
}
function setVersion(string calldata v) external onlyOwner {
if (locked) revert Locked();
version = v;
emit VersionSet(v);
}
/// @notice Freeze both documents permanently. One-way.
/// @dev Re-checks that the documents are readable rather than trusting `setChunks`: a one-way door
/// should not depend on a guarantee stated in another function. Not an `html()` call, which
/// is unbounded gas and would fail for size rather than correctness. The emptiness check is
/// the dapp's alone: a dapp with no widget is a complete document, and the widget's own
/// pointers are still checked for code so a locked `App` cannot carry an unreadable one.
/// The re-check is for a readable *chunk* and not merely for code, because a pointer that
/// holds code that is not a chunk is the thing the lock must refuse: its bytes can still
/// change afterwards, which is exactly the promise `lock()` exists to make.
function lock() external onlyOwner {
uint256 n = chunks.length;
if (n == 0) revert EmptyDocument();
for (uint256 i; i < n; ++i) {
_requireChunk(chunks[i]);
}
uint256 w = widgetChunks.length;
for (uint256 i; i < w; ++i) {
_requireChunk(widgetChunks[i]);
}
locked = true;
emit AppLocked();
}
function chunkCount() external view returns (uint256) {
return chunks.length;
}
function widgetChunkCount() external view returns (uint256) {
return widgetChunks.length;
}
function _raw(address[] storage list) internal view returns (bytes memory out) {
uint256 n = list.length;
for (uint256 i; i < n; ++i) {
out = bytes.concat(out, SSTORE2.read(list[i]));
}
}
/// @dev Reverts unless `ptr` is a readable SSTORE2 chunk: non-empty code whose first byte is 0x00.
function _requireChunk(address ptr) private view {
uint256 n;
bytes32 first;
/// @solidity memory-safe-assembly
assembly {
n := extcodesize(ptr)
extcodecopy(ptr, 0x00, 0x00, 0x01)
first := mload(0x00)
}
if (n == 0) revert CodelessChunk(ptr);
if (first[0] != 0x00) revert ForeignChunk(ptr);
}
function _eq(string memory a, string memory b) private pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
ABI
The contract Application Binary Interface (ABI) as returned by Etherscan.
Source: Etherscan - Contract ABI
Command:
curl "https://api.etherscan.io/v2/api?chainid=1&module=contract&action=getabi&address=0x00a9F390A6010d045e0d34856048DdD6910d25BA&apikey=$ETHERSCAN_API_KEY"
Artifact:
[
{
"inputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"internalType": "string",
"name": "version_",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyInitialized",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "ptr",
"type": "address"
}
],
"name": "CodelessChunk",
"type": "error"
},
{
"inputs": [],
"name": "EmptyDocument",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "ptr",
"type": "address"
}
],
"name": "ForeignChunk",
"type": "error"
},
{
"inputs": [],
"name": "Locked",
"type": "error"
},
{
"inputs": [],
"name": "NewOwnerIsZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "NoHandoverRequest",
"type": "error"
},
{
"inputs": [],
"name": "Unauthorized",
"type": "error"
},
{
"anonymous": false,
"inputs": [],
"name": "AppLocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "count",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "gzipped",
"type": "bool"
}
],
"name": "ChunksSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "pendingOwner",
"type": "address"
}
],
"name": "OwnershipHandoverCanceled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "pendingOwner",
"type": "address"
}
],
"name": "OwnershipHandoverRequested",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "version",
"type": "string"
}
],
"name": "VersionSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"name": "WidgetChunksSet",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "addChunk",
"outputs": [
{
"internalType": "address",
"name": "ptr",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "addWidgetChunk",
"outputs": [
{
"internalType": "address",
"name": "ptr",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "cancelOwnershipHandover",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "chunkCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "chunks",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pendingOwner",
"type": "address"
}
],
"name": "completeOwnershipHandover",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "gzipped",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "html",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lock",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "locked",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "result",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pendingOwner",
"type": "address"
}
],
"name": "ownershipHandoverExpiresAt",
"outputs": [
{
"internalType": "uint256",
"name": "result",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string[]",
"name": "resource",
"type": "string[]"
},
{
"components": [
{
"internalType": "string",
"name": "key",
"type": "string"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"internalType": "struct App.KeyValue[]",
"name": "",
"type": "tuple[]"
}
],
"name": "request",
"outputs": [
{
"internalType": "uint16",
"name": "statusCode",
"type": "uint16"
},
{
"internalType": "string",
"name": "body",
"type": "string"
},
{
"components": [
{
"internalType": "string",
"name": "key",
"type": "string"
},
{
"internalType": "string",
"name": "value",
"type": "string"
}
],
"internalType": "struct App.KeyValue[]",
"name": "headers",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "requestOwnershipHandover",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "resolveMode",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "ptrs",
"type": "address[]"
},
{
"internalType": "bool",
"name": "gzipped_",
"type": "bool"
}
],
"name": "setChunks",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "v",
"type": "string"
}
],
"name": "setVersion",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "ptrs",
"type": "address[]"
}
],
"name": "setWidgetChunks",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "widget",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "widgetChunkCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "widgetChunks",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
Storage Reads
Pinned reads on mainnet at block 26,509,901 (etherscan) and Base at block 63,160,000 (basescan), produced by snapshot.sh in the artifacts directory.
Source: On-chain via cast
Command:
Artifact:
== mainnet block 26509901 ts 1795822883
owner()(address) = 0x00c0e88778E3e3d17AcaaBC7550deC7Ab61F3790
chunkCount()(uint256) = 3
widgetChunkCount()(uint256) = 1
gzipped()(bool) = true
locked()(bool) = false
version()(string) = "v0.1"
chunks[0] = 0x029E4004a2Be5fd03db9aDCee825898Ef70D98F4
chunks[1] = 0x87eE9c5C1857f57C941A880be4BbC036471780A3
chunks[2] = 0x295fF302b881280C245491aD0109324654239227
widgetChunks[0] = 0x93Fa808681b91aA401eF4f83F961cf17bab19044
chunks[3] (past end) = Error: server returned an error response: error code 3: execution reverted, data: "0x"
balance 0 nonce 5
slot 0 = 0x0000000000000000000000000000000000000000000000000000000000000003
slot 1 = 0x0000000000000000000000000000000000000000000000000000000000000001
slot 2 = 0x0000000000000000000000000000000000000000000000000000000000000001
slot 3 = 0x76302e3100000000000000000000000000000000000000000000000000000008
owner slot not(0x8b78c6d8) = 0x00000000000000000000000000c0e88778e3e3d17acaabc7550dec7ab61f3790
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563 = 0x000000000000000000000000029e4004a2be5fd03db9adcee825898ef70d98f4
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564 = 0x00000000000000000000000087ee9c5c1857f57c941a880be4bbc036471780a3
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e565 = 0x000000000000000000000000295ff302b881280c245491ad0109324654239227
slot 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6 = 0x00000000000000000000000093fa808681b91aa401ef4f83f961cf17bab19044
== base block 63160000 ts 1795822375
owner()(address) = 0x00c0e88778E3e3d17AcaaBC7550deC7Ab61F3790
chunkCount()(uint256) = 3
widgetChunkCount()(uint256) = 1
gzipped()(bool) = true
locked()(bool) = false
version()(string) = "v0.1"
chunks[0] = 0x029E4004a2Be5fd03db9aDCee825898Ef70D98F4
chunks[1] = 0x87eE9c5C1857f57C941A880be4BbC036471780A3
chunks[2] = 0x295fF302b881280C245491aD0109324654239227
widgetChunks[0] = 0x93Fa808681b91aA401eF4f83F961cf17bab19044
chunks[3] (past end) = Error: server returned an error response: error code 3: execution reverted
balance 0 nonce 5
slot 0 = 0x0000000000000000000000000000000000000000000000000000000000000003
slot 1 = 0x0000000000000000000000000000000000000000000000000000000000000001
slot 2 = 0x0000000000000000000000000000000000000000000000000000000000000001
slot 3 = 0x76302e3100000000000000000000000000000000000000000000000000000008
owner slot not(0x8b78c6d8) = 0x00000000000000000000000000c0e88778e3e3d17acaabc7550dec7ab61f3790
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563 = 0x000000000000000000000000029e4004a2be5fd03db9adcee825898ef70d98f4
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564 = 0x00000000000000000000000087ee9c5c1857f57c941a880be4bbc036471780a3
slot 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e565 = 0x000000000000000000000000295ff302b881280c245491ad0109324654239227
slot 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6 = 0x00000000000000000000000093fa808681b91aa401ef4f83f961cf17bab19044
Simulations
Revert-path, lock and routing checks run with cast call against mainnet state at block 26,509,853 (etherscan), produced by sim.sh. Error selectors are listed in Functions. The body chars figures count the string as cast prints it, with quotes and escapes, so they run slightly above the byte lengths given elsewhere (72,417 for the dapp, 8,525 for the widget). Lines marked locked: use a state override setting slot 2 to 0x…0101.
Source: On-chain simulation via cast call
Command:
Artifact:
block 26509853
## stranger addChunk
Error: server returned an error response: error code 3: execution reverted, data: "0x82b42900"
## stranger setChunks
Error: server returned an error response: error code 3: execution reverted, data: "0x82b42900"
## stranger lock
Error: server returned an error response: error code 3: execution reverted, data: "0x82b42900"
## owner addChunk (pointer out)
0x12B3361f2f92Fd5B8f72C06E0241a2715927a607
## owner setChunks []
Error: server returned an error response: error code 3: execution reverted, data: "0x62c33689"
## owner setChunks [EOA]
Error: server returned an error response: error code 3: execution reverted, data: "0xef9230eb0000000000000000000000005a158af8dc28fe756db81ef669e4db2536bbc50d"
## owner setChunks [7702 acct]
Error: server returned an error response: error code 3: execution reverted, data: "0x449e1ab9000000000000000000000000357836ffcb45307fa7ff2a574f505753c961902b"
## owner setChunks [App itself]
Error: server returned an error response: error code 3: execution reverted, data: "0x449e1ab900000000000000000000000000a9f390a6010d045e0d34856048ddd6910d25ba"
## owner setChunks [C2,C0,C1] reorder
0x
## owner setWidgetChunks []
Error: server returned an error response: error code 3: execution reverted, data: "0x62c33689"
## owner setWidgetChunks [chunk0]
0x
## owner lock (current state)
0x
## owner lock, chunks empty
Error: server returned an error response: error code 3: execution reverted, data: "0x62c33689"
## owner lock, widget ptr = EOA
Error: server returned an error response: error code 3: execution reverted, data: "0xef9230eb0000000000000000000000005a158af8dc28fe756db81ef669e4db2536bbc50d"
## locked: addChunk
Error: server returned an error response: error code 3: execution reverted, data: "0x0f2e5b6c"
## locked: setChunks
Error: server returned an error response: error code 3: execution reverted, data: "0x0f2e5b6c"
## locked: addWidgetChunk
Error: server returned an error response: error code 3: execution reverted, data: "0x0f2e5b6c"
## locked: setWidgetChunks
Error: server returned an error response: error code 3: execution reverted, data: "0x0f2e5b6c"
## locked: setVersion
Error: server returned an error response: error code 3: execution reverted, data: "0x0f2e5b6c"
## locked: lock again
0x
## locked: transferOwnership
0x
## locked: renounceOwnership
0x
## transferOwnership(0)
Error: server returned an error response: error code 3: execution reverted, data: "0x7448fbae"
## completeHandover, no request
Error: server returned an error response: error code 3: execution reverted, data: "0x6f5e8818"
## locked()
true
## request []
status 200 body chars 72423 headers [("Content-Type", "text/html; charset=utf-8")]
## request [""]
status 200 body chars 72423 headers [("Content-Type", "text/html; charset=utf-8")]
## request ["index.html"]
status 200 body chars 72423 headers [("Content-Type", "text/html; charset=utf-8")]
## request ["widget.js"]
status 200 body chars 8702 headers [("Content-Type", "application/javascript; charset=utf-8")]
## request ["/"]
status 404 body chars 2 headers []
## request ["Index.html"]
status 404 body chars 2 headers []
## request ["widget.js",""]
status 404 body chars 2 headers []
## request ["index.html","x"]
status 404 body chars 2 headers []
## request ["favicon.ico"]
status 404 body chars 2 headers []
## request [widget.js] with widgetChunks empty
404
## html() with gzipped=false (override slot 2 = 0)
returns the raw gzip stream (1f8b08...) as the string, without the bootstrap
Setup Trace
Call tree of the last setup transaction 0x60b99bb3...59fb69 (tx), filtered to calls and events. Long calldata is truncated.
Source: Replay via cast run
Command:
Artifact:
[3163950] Multisig::executeQueued(Multisig: [0x00c0e88778E3e3d17AcaaBC7550deC7Ab61F3790], 0, 0xde24dce20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000 …
├─ [3157853] Multisig::executeQueued(Multisig: [0x00c0e88778E3e3d17AcaaBC7550deC7Ab61F3790], 0, 0xde24dce200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000 …
│ ├─ [3139266] Multisig::batch([0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA], [0, 0 …
│ │ ├─ [3135716] Multisig::batch([0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA, 0x00a9F390A6010d045e0d34856048DdD6910d25BA], [ …
│ │ │ ├─ [1229944] App::addChunk(0xb24d1187b29c89d57dcb98f0dce9238f4594b008e25fe03332f97ad6e394f10376b6b1f38bd17c28aff61c57fb1275a8f63226853adaac9fbd9a648fb27f5e9fadffb34a9f8cbc63c6b022178f8ed76806288bb90860a55 …
│ │ │ │ ├─ emit ChunksSet(count: 3, gzipped: false)
│ │ │ ├─ [1788236] App::addWidgetChunk(0x2866756e6374696f6e202829207b0a2775736520737472696374273b0a76617220534e4150203d202730783937313137313561272c2053455442454e203d202730783838363866343930273b0a766172204348414 …
│ │ │ │ ├─ emit WidgetChunksSet(count: 1)
│ │ │ ├─ [64512] App::setChunks([0x029E4004a2Be5fd03db9aDCee825898Ef70D98F4, 0x87eE9c5C1857f57C941A880be4BbC036471780A3, 0x295fF302b881280C245491aD0109324654239227], true)
│ │ │ │ ├─ emit ChunksSet(count: 3, gzipped: true)
│ │ │ ├─ [43485] App::setWidgetChunks([0x93Fa808681b91aA401eF4f83F961cf17bab19044])
│ │ │ │ ├─ emit WidgetChunksSet(count: 1)
│ ├─ emit ExecutionSuccess(txHash: 0x3834cb3113e939e5b8ccb9f183784492d954844d647167709988438a08522cdd, nonce: 5)
Content Checks
The dapp reassembled from the chunks on each chain, decompressed and compared. The full documents are in artifacts/00a9F390...0d25BA/content/.
Source: Chunk code via cast code, decompressed locally
Command:
Artifact:
mainnet gzip 53,805 B html 170,381 B html() return 72,417 B base64 payload == chunks: true
base gzip 53,806 B html 170,384 B
widget 8,525 B on both chains, byte-identical; widget() == chunk: true
widget SRI computed: sha384-8BWWI1ktl/NJwMpr0nOSjqG+S1bbjHSFVlPmZfULysk/4BMbvnd34o+TUyQP+t9I
only differing line, mainnet:
const CFG = { chainId: '1', version: '0.1alpha', factory: '0x00D19609f2349d4160D2BaBAf46b0Cd1eC6d7f8E', factoryBlock: '0x193e5a9', featuredSalt: '0x68e0741d8d693e14bf56914567eaddc130b186ee000000000000000000000001', app: '0x00a9F390A6010d045e0d34856048DdD6910d25BA', impl: '0xc4eD7EA21B8CC334F08945B4D0c182e0afF8cB0A', widgetSri: 'sha384-8BWWI1ktl/NJwMpr0nOSjqG+S1bbjHSFVlPmZfULysk/4BMbvnd34o+TUyQP+t9I' }
only differing line, base:
const CFG = { chainId: '8453', version: '0.1alpha', factory: '0x00D19609f2349d4160D2BaBAf46b0Cd1eC6d7f8E', factoryBlock: '0x39eaddd', featuredSalt: '0x68e0741d8d693e14bf56914567eaddc130b186ee000000000000000000000001', app: '0x00a9F390A6010d045e0d34856048DdD6910d25BA', impl: '0xc4eD7EA21B8CC334F08945B4D0c182e0afF8cB0A', widgetSri: 'sha384-8BWWI1ktl/NJwMpr0nOSjqG+S1bbjHSFVlPmZfULysk/4BMbvnd34o+TUyQP+t9I' }
Widget Source
The widget JavaScript as stored in 0x93Fa8086...b19044 (etherscan) and returned by widget() and request(["widget.js"]).
Source: On-chain via cast code
Command:
Artifact:
(function () {
'use strict';
var SNAP = '0x9711715a', SETBEN = '0x8868f490';
var CHAINS = {
'1': 'ethereum', '10': 'op mainnet', '8453': 'base', '42161': 'arbitrum', '4326': 'megaeth', '4663': 'robinhood',
'11155111': 'sepolia', '84532': 'base sepolia', '31337': 'anvil', '31338': 'anvil 31338'
};
var SRC = document.currentScript && document.currentScript.src;
var RULE = '1px solid color-mix(in srgb, currentColor 18%, transparent)';
var CSS = '.rk{font:inherit;color:inherit;--rk-ac:oklch(.47 .09 230);--rk-am:#B8741A;--rk-er:#B23A2E}'
+ '.rk.rk-dk{--rk-ac:oklch(.58 .09 230);--rk-am:#CE9640;--rk-er:#D06456}'
+ '.rk-b{display:flex;height:22px;border-radius:4px;overflow:hidden}'
+ '.rk-c .rk-b{height:14px}'
+ '.rk-w{background:repeating-linear-gradient(45deg,color-mix(in srgb, currentColor 15%, transparent) 0 6px,transparent 6px 12px)}'
+ '.rk-x{border:1px dashed var(--rk-er)}'
+ '.rk-s{flex:0 0 auto}'
+ '.rk-s0{background:color-mix(in srgb, var(--rk-ac) 100%, transparent)}'
+ '.rk-s1{background:color-mix(in srgb, var(--rk-ac) 75%, transparent)}'
+ '.rk-s2{background:color-mix(in srgb, var(--rk-ac) 50%, transparent)}'
+ '.rk-msg{font-size:12px;opacity:.5;margin-top:7px}'
+ '.rk-err{font-size:12px;color:var(--rk-er);margin-top:7px}'
+ '.rk-rt{all:unset;cursor:pointer;border-bottom:1px solid var(--rk-er);color:var(--rk-er)}'
+ '.rk-h{font-size:12.5px;font-weight:600;margin-bottom:9px}'
+ '.rk-t{margin-top:9px;font-size:12px}'
+ '.rk-r{display:flex;justify-content:space-between;gap:12px;padding:4px 0}'
+ '.rk-r>span{min-width:0}'
+ '.rk-nt{opacity:.55}'
+ '.rk-pc{font-variant-numeric:tabular-nums}'
+ '.rk-q{font-size:11px;color:var(--rk-am);margin-top:7px}'
+ '.rk-qb{display:flex;height:8px;gap:2px;margin-top:4px}'
+ '.rk-qb>div{flex:0 0 auto;border:1px solid var(--rk-am);box-sizing:border-box;border-radius:2px}'
+ '.rk-nd{font-size:11.5px;color:var(--rk-am);margin-top:8px}'
+ '.rk-1{font-size:12.5px;margin-top:7px}'
+ '.rk-dm{opacity:.5}'
+ '.rk a{color:inherit;text-decoration:none;border-bottom:1px solid currentColor}'
+ '.rk-f{margin-top:10px;padding-top:8px;border-top:' + RULE + ';font-size:10.5px;opacity:.5}';
function esc(s){return String(s).replace(/[\u202A-\u202E\u2066-\u2069]/g,'').replace(/[&<>"]/g,function(c){return{'&':'&','<':'<','>':'>','"':'"'}[c]})}
function short(a){return a.slice(0,6)+'…'+a.slice(-4)}
function pct(bps){return bps/100}
function cname(id){return CHAINS[id]||'chain '+id}
function fmtDelay(s){return !s?'no delay':s%86400===0?s/86400+'d':s%3600===0?s/3600+'h':s%60===0?s/60+'m':s+'s'}
function fmtEta(eta){var s=eta-Math.floor(Date.now()/1000);if(s<=0)return null;var d=Math.floor(s/86400),h=Math.floor(s%86400/3600),m=Math.floor(s%3600/60);return d?d+'d '+h+'h':(h?h+'h '+m+'m':m+'m')}
var GRACE=1209600;
var SKEW=3600;
var CLOCKNOTE="judged by this device's clock";
function etaText(eta){var left=fmtEta(eta);return left?'lands in '+left:(Math.floor(Date.now()/1000)>eta+GRACE+SKEW?'expired':'ready to apply')}
function isDark(el){
var n=el;while(n&&n!==document.documentElement){
var bg=getComputedStyle(n).backgroundColor,m=bg&&bg.match(/rgba?\(([^)]+)\)/);
if(m){var p=m[1].split(',').map(parseFloat);if(p.length<4||p[3]>0){return (0.2126*p[0]+0.7152*p[1]+0.0722*p[2])/255<0.45}}
n=n.parentElement}
return false}
function reader(hex){
var H=hex.slice(2).toLowerCase();
function u(p){return parseInt(H.substr(p*2,64),16)}
function adr(p){return '0x'+H.substr(p*2+24,40)}
function txt(p){var n=u(p)*2,s='',i=0;for(;i<n;i+=2)s+='%'+H.substr(p*2+64+i,2);if(!n)return '';
try{return decodeURIComponent(s)}catch(e){return s.replace(/%(..)/g,function(_,c){return String.fromCharCode(parseInt(c,16))})}}
function hx(p){return '0x'+H.substr(p*2+64,u(p)*2)}
function arr(p,f){var n=u(p),o=p+32,r=[],i=0;if(n>H.length/64)throw 0;for(;i<n;i++)r.push(f(o+u(o+i*32)));return r}
function ben(p){return{account:adr(p),bps:u(p+32),name:txt(p+u(p+64)),note:txt(p+u(p+96))}}
return{u:u,adr:adr,txt:txt,hx:hx,arr:arr,ben:ben}}
function decode(hex){
if(!hex||!/^0x[0-9a-fA-F]+$/.test(hex)||hex.length<642)return null;
try{
var r=reader(hex),b=r.u(0);
return{
owner:r.adr(b),delay:r.u(b+32),nonce:r.u(b+64),description:r.txt(b+r.u(b+96)),
table:r.arr(b+r.u(b+128),r.ben),
pending:r.arr(b+r.u(b+160),function(p){
var act=r.hx(p+r.u(p+64)),t=null;
if(act.slice(0,10)===SETBEN){var q=reader('0x'+act.slice(10));t=q.arr(q.u(0),q.ben)}
return{eta:r.u(p+32),table:t}})
}}catch(e){return null}}
function fetchSnapshot(addr,cid,rpc,cb){
var p={to:addr,data:SNAP};
if(rpc){
fetch(rpc,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({jsonrpc:'2.0',id:1,method:'eth_call',params:[p,'latest']})})
.then(function(r){return r.json()}).then(function(j){cb(j&&j.result)}).catch(function(){cb(null)});
return}
var w=window.ethereum;
if(!w){cb(null,'no wallet and no data-rpc — nothing to read '+short(addr)+' with');return}
w.request({method:'eth_chainId'}).then(function(id){
var on=parseInt(id,16);
if(on!==parseInt(cid,10)){cb(null,'wallet is on '+cname(on)+', distribution is on '+cname(cid));return}
return w.request({method:'eth_call',params:[p,'latest']}).then(function(hex){cb(hex)})
}).catch(function(){cb(null)})}
function inject(){
if(document.getElementById('rk-css'))return;
var s=document.createElement('style');s.id='rk-css';s.textContent=CSS;document.head.appendChild(s)}
function widths(el){var s=el.querySelectorAll('[data-w]'),i=0;for(;i<s.length;i++)s[i].style.flexBasis=s[i].getAttribute('data-w')}
function bar(table,wrap,tint,adj){
return '<div class="'+wrap+'">'+table.map(function(b,i){
var w=pct(b.bps);
return '<div'+(tint?' class="rk-s rk-s'+(i%3)+'"':'')+' data-w="'+(adj?'calc('+w+'% - '+adj+'px)':w+'%')
+'" title="'+esc(b.name||'')+' '+w+'%"></div>'}).join('')+'</div>'}
function fail(el,text){
el.innerHTML='<div class="rk-b rk-x"></div><div class="rk-err">'+esc(text)
+' · <button class="rk-rt" data-retry>retry</button></div>';
var r=el.querySelector('[data-retry]');if(r)r.addEventListener('click',function(){render(el)})}
function render(el){
inject();
var addr=el.getAttribute('data-rake')||'',cid=el.getAttribute('data-chain')||'1';
var rpc=el.getAttribute('data-rpc'),compact=el.getAttribute('data-variant')==='compact';
var themeAttr=el.getAttribute('data-theme'),dark=themeAttr?themeAttr==='dark':isDark(el);
el.classList.add('rk');el.classList.toggle('rk-c',compact);el.classList.toggle('rk-dk',dark);
if(!/^0x[0-9a-fA-F]{40}$/.test(addr)){fail(el,'data-rake is not an address');return}
el.innerHTML='<div class="rk-b rk-w"></div><div class="rk-msg">reading distribution…</div>';
fetchSnapshot(addr,cid,rpc,function(hex,why){
var snap=decode(hex);
if(!snap){
fail(el,why||'could not read distribution '+short(addr)+' on '+cname(cid));
return}
var link=el.getAttribute('data-link');
var href=null;
if(link!==null){try{var u2=new URL(link||(SRC?new URL('./',SRC).href:location.href),location.href);
if(u2.protocol==='http:'||u2.protocol==='https:')href=u2.href.split('#')[0]+'#/distros/'+addr}catch(e){}}
var foot=(snap.delay?'delay '+fmtDelay(snap.delay):'no delay')+' · owner '+short(snap.owner)+' · '+short(addr)+' · '+esc(cname(cid))
+(href===null?'':' · <a href="'+esc(href)+'"'+(SRC?' target="_blank" rel="noopener noreferrer"':'')+'>view ↗</a>');
if(compact){
el.innerHTML=bar(snap.table,'rk-b',1)
+'<div class="rk-1">'+snap.table.map(function(b){return '<b>'+esc(b.name)+'</b> '+pct(b.bps)+'%'}).join(' · ')
+' <span class="rk-dm">— '+foot+'</span></div>';
widths(el);return}
var h='<div class="rk-h">'+esc(snap.description)+'</div>'
+bar(snap.table,'rk-b',1)
+'<div class="rk-t">'+snap.table.map(function(b){
return '<div class="rk-r"><span><b>'+esc(b.name)+'</b>'
+(b.note?' <span class="rk-nt">· '+esc(b.note)+'</span>':'')
+'</span><b class="rk-pc">'+pct(b.bps)+'%</b></div>'}).join('')+'</div>';
snap.pending.forEach(function(p){
h+='<div class="rk-q" title="'+CLOCKNOTE+'">a change is queued · '+(p.eta?etaText(p.eta):'ready to apply')+'</div>';
if(p.table){var n=p.table.length;h+=bar(p.table,'rk-qb',0,((n-1)*2/n).toFixed(1))}});
if(!snap.delay)h+='<div class="rk-nd">no delay — the owner can change this table instantly</div>';
h+='<div class="rk-f">'+foot+'</div>';
el.innerHTML=h;widths(el)})}
function mountAll(){for(var els=document.querySelectorAll('[data-rake]'),i=0;i<els.length;i++)render(els[i])}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',mountAll);else mountAll();
window.RakeWidget={mount:render,refresh:mountAll};
})();