From 187ab9790f4b5579c700d9f0096cea4a3f240274 Mon Sep 17 00:00:00 2001 From: Ihor Farion Date: Thu, 12 Feb 2026 19:56:32 -0800 Subject: [PATCH 1/2] deploy and configure Signed-off-by: Ihor Farion --- .../999/run-latest.json | 147 ++++------------ broadcast/deployed-addresses.json | 6 +- broadcast/deployed-addresses.md | 2 +- script/DeployHyperliquidDepositHandler.s.sol | 165 +++++++++++++----- script/mintburn/README.md | 26 +++ script/mintburn/ReadHCoreTokenInfoUtil.s.sol | 45 +++-- script/mintburn/hypercore-tokens.json | 33 +++- script/mintburn/oft/DstHandlerConfigLib.s.sol | 11 +- 8 files changed, 245 insertions(+), 190 deletions(-) create mode 100644 script/mintburn/README.md diff --git a/broadcast/DeployHyperliquidDepositHandler.s.sol/999/run-latest.json b/broadcast/DeployHyperliquidDepositHandler.s.sol/999/run-latest.json index 881273a0d..763d1c921 100644 --- a/broadcast/DeployHyperliquidDepositHandler.s.sol/999/run-latest.json +++ b/broadcast/DeployHyperliquidDepositHandler.s.sol/999/run-latest.json @@ -1,173 +1,86 @@ { "transactions": [ { - "hash": "0x187b45f39be413aff2ff526946c64f76ed98763129e7e2ffb7d2d4c5bd997519", + "hash": "0xf7f1b77559935ec04f3a3a89601b621f21d4cf38c2701e8df18e10f333b24c7c", "transactionType": "CREATE", "contractName": "HyperliquidDepositHandler", - "contractAddress": "0x861e127036b28d32f3777b4676f6bbb9e007d195", + "contractAddress": "0xbfb53e9c8acce6d6ac54885a8e33a7aec95427d5", "function": null, - "arguments": null, + "arguments": ["0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D", "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04"], "transaction": { "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", - "gas": "0x160360", + "gas": "0x32a557", "value": "0x0", - "input": "0x60a080604052346100e15760015f5533156100cc5760018054336001600160a01b03198216811790925560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36103a38181016001600160401b038111838210176100b8578291610ed2833903905ff080156100ad57608052604051610dec90816100e682396080518181816101b70152818161026a01526108080152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b81525f6004820152602490fd5b5f80fdfe6040608081526004361015610012575f80fd5b5f905f3560e01c80633a5be8cb146105275780633eda20c61461045757806368c4ac26146103f2578063715018a61461038c5780637826a16e146102fa5780637bce887a146102385780638da5cb5b146102115780639b61d2d8146101db578063a4b672b614610198578063c48919d61461012c5763f2fde38b14610095575f80fd5b34610128576020366003190112610128576100ae6105df565b6100b66109f6565b6001600160a01b0380911691821561011157506001548273ffffffffffffffffffffffffffffffffffffffff19821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a380f35b51631e4fbdf760e01b815260048101849052602490fd5b5080fd5b8234610195576060366003190112610195576101466105df565b61014e610695565b6101566105f5565b61015e6109f6565b60025f54146101915767ffffffffffffffff602061018261018a9560025f55610a65565b015116610b1d565b6001815580f35b5f80fd5b80fd5b5034610128578160031936011261012857602090516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610195576101ea366106ac565b6101f26109f6565b60025f5414610191576001600160a01b0361018a9360025f5516610a22565b50346101285781600319360112610128576020906001600160a01b03600154169051908152f35b50903461019157610248366106ac565b90916102526109f6565b60025f54146101915760025f556001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016911694813b1561019157805163f3fef3a360e01b81526001600160a01b038716600482015260248101859052915f908390604490829084905af19081156102f157506102dc575b5061018a9293610a22565b61018a93506102ea90610627565b5f926102d1565b513d5f823e3d90fd5b503461019157610309366106ac565b9160025f54146101915760025f5583516323b872dd60e01b60208201523360248201523060448201526064808201849052815260a08101949067ffffffffffffffff861181871017610378576103729561036d92526001600160a01b038316610c49565b610716565b60015f55005b634e487b7160e01b5f52604160045260245ffd5b34610191575f366003190112610191576103a46109f6565b5f6001600160a01b0360015473ffffffffffffffffffffffffffffffffffffffff198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b5034610191576020366003190112610191576080906001600160a01b0390816104196105df565b165f526002602052805f2080549167ffffffffffffffff600260018401549301545f0b938251958116865260a01c1660208501528301526060820152f35b5034610191576080366003190112610191576104716105df565b610479610695565b9060643592835f0b809403610191576002926104936109f6565b81519261049f8461060b565b6001600160a01b038091169283855267ffffffffffffffff6020860193168352808501936044358552606086019788525f52856020525f209351167bffffffffffffffff00000000000000000000000000000000000000008454925160a01b169163ffffffff60e01b161717825551600182015501905160ff198254169060ff161790555f80f35b5034610191576080366003190112610191576105416105df565b9061054a6105f5565b506064359067ffffffffffffffff8211610191573660238301121561019157816004013561058361057a82610679565b92519283610657565b8082526020820192366024838301011161019157815f9260246020930186378301015260025f54146101915760209060025f5580518101031261019157516001600160a01b038116809103610191576103729160243590610716565b600435906001600160a01b038216820361019157565b604435906001600160a01b038216820361019157565b6080810190811067ffffffffffffffff82111761037857604052565b67ffffffffffffffff811161037857604052565b6040810190811067ffffffffffffffff82111761037857604052565b90601f8019910116810190811067ffffffffffffffff82111761037857604052565b67ffffffffffffffff811161037857601f01601f191660200190565b6024359067ffffffffffffffff8216820361019157565b6060906003190112610191576001600160a01b03600435818116810361019157916024359160443590811681036101915790565b9073200000000000000000000000000000000000000091820180921161070257565b634e487b7160e01b5f52601160045260245ffd5b9161072083610a65565b67ffffffffffffffff926020908482840151169260608101515f0b926040805192828401985f806001600160a01b039b8c8c16978882528781526107638161063b565b51906108105afa610772610c0d565b90156109e557848180518101031261019157835191858301908111838210176103785784526107a2908501610c3c565b809152156107f3575b50505050906107b991610cef565b9390806107c9575b505050505050565b6107e895826107e3936107db866106e0565b169116610a22565b610b1d565b5f80808080806107c1565b810151916001830180931161070257898916937f00000000000000000000000000000000000000000000000000000000000000008a16803b1561019157835163f3fef3a360e01b81526001600160a01b038716600482015260248101869052905f908290604490829084905af180156109db576109cc575b506108768785610cef565b50806109b1575b50825191808301918252888484015260016060840152606083526108a08361060b565b6108d56024855180946108c5858301976280000360e11b895251809285850190610afc565b8101036004810185520183610657565b733333333333333333333333333333333333333333803b15610191575f92836044610924948851978896879586936317938e1360e01b8552600485015251809281602486015285850190610afc565b601f01601f191681010301925af180156109a757927f45b9d2d602535b50313ef0fa849df42dd31d8610fc42876e005a5b6806d3e8809261098b926107b998979695610998575b50516001600160a01b038a16815260208101919091529081906040820190565b0390a290915f80806107ab565b6109a190610627565b5f61096b565b82513d5f823e3d90fd5b6109c6908b6109bf8b6106e0565b1687610a22565b5f61087d565b6109d590610627565b5f61086b565b84513d5f823e3d90fd5b83516313dd7ccd60e31b8152600490fd5b6001600160a01b03600154163303610a0a57565b60405163118cdaa760e01b8152336004820152602490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610a6391610a5e606483610657565b610c49565b565b60405f60608251610a758161060b565b828152826020820152828482015201526001600160a01b03809216805f52600260205282825f20541615610aeb57906002915f5281602052805f209067ffffffffffffffff815194610ac68661060b565b8354908116865260a01c16602085015260018201549084015201545f0b606082015290565b8151633dd1b30560e01b8152600490fd5b5f5b838110610b0d5750505f910152565b8181015183820152602001610afe565b604051926001600160a01b03602085019316835267ffffffffffffffff809216604085015216606083015260608252610b558261060b565b610b8c60246040518093610b7c60208301966280000360e11b885251809285850190610afc565b8101036004810184520182610657565b73333333333333333333333333333333333333333390813b15610191575f91610bde918360446040518097819682956317938e1360e01b84526020600485015251809281602486015285850190610afc565b601f01601f191681010301925af18015610c0257610bf95750565b610a6390610627565b6040513d5f823e3d90fd5b3d15610c37573d90610c1e82610679565b91610c2c6040519384610657565b82523d5f602084013e565b606090565b5190811515820361019157565b905f806001600160a01b03610ca69416927f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020604051610c898161063b565b818152015260208151910182855af1610ca0610c0d565b91610d8d565b8051908115918215610cbc575b50501561019157565b8192509060209181010312610191576020610cd79101610c3c565b5f80610cb3565b60ff16604d811161070257600a0a90565b9190805f0b9081155f14610d0d57505067ffffffffffffffff821690565b5f821315610d5757610d22915060ff16610cde565b8015610d4357808306830392831161070257820467ffffffffffffffff1690565b634e487b7160e01b5f52601260045260245ffd5b505f0380805f0b0361070257610d6f9060ff16610cde565b828181029181830414901517156107025767ffffffffffffffff1690565b9015610da757815115610d9e575090565b3b156101915790565b50805190811561019157602001fdfea2646970667358221220c0cba36db139425c71e4049e05ab727a287009647e4f3ca742370867c5d7d0ff64736f6c634300081800336080806040523461005a575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610344908161005f8239f35b5f80fdfe608060409080825260049081361015610016575f80fd5b5f3560e01c908163715018a61461026e5781638da5cb5b1461024c57508063f2fde38b146101d45763f3fef3a31461004c575f80fd5b346101545781600319360112610154578035916001600160a01b0383168093036101545760249261007b6102d2565b8151916020830163a9059cbb60e01b815233868501528535604485015260448452608084019367ffffffffffffffff94818110868211176101c25760c08201818110878211176101b0578452602090527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152515f9182919082865af1923d1561019f573d9181831161018d57805195601f8401601f19908116603f011687019283118784101761017b575052835261013e93503d5f602085013e6102e5565b8051908115918215610158575b50501561015457005b5f80fd5b819250906020918101031261015457602001518015158103610154575f8061014b565b60418891634e487b7160e01b5f52525ffd5b86604187634e487b7160e01b5f52525ffd5b5050915061013e92506060916102e5565b88604189634e487b7160e01b5f52525ffd5b87604188634e487b7160e01b5f52525ffd5b503461015457602036600319011261015457356001600160a01b03808216809203610154576102016102d2565b8115610154575f548273ffffffffffffffffffffffffffffffffffffffff198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b34610154575f366003190112610154576020906001600160a01b035f54168152f35b34610154575f366003190112610154576102866102d2565b5f6001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b6001600160a01b035f5416330361015457565b90156102ff578151156102f6575090565b3b156101545790565b50805190811561015457602001fdfea2646970667358221220c55691de465342d56d68c31160f5d7d661422ef39ebccaa5223872c823ad6d6964736f6c63430008180033", - "nonce": "0x206", + "input": "0x610180806040523461025757604081612fec8038038091610020828561025b565b8339810103126102575761003f60206100388361027e565b920161027e565b9060405161004e60408261025b565b6019815260208101907f48797065726c69717569644465706f73697448616e646c65720000000000000082526040519161008960408461025b565b60058352640312e302e360dc1b6020840190815260015f8181558154336001600160a01b0319821681179093559294926001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36100f081610292565b610120526100fd8461042d565b61014052519020918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261016660c08261025b565b5190206080523060c05260405161037e8082016001600160401b03811183821017610243578291612c6e833903905ff080156102385761016052600580546001600160a01b039283166001600160a01b0319918216179091556006805493909216921691909117905560405161270890816105668239608051816124bc015260a05181612579015260c0518161248d015260e0518161250b01526101005181612531015261012051816103b8015261014051816103e2015261016051818181610318015281816104c701526121810152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b601f909101601f19168101906001600160401b0382119082101761024357604052565b51906001600160a01b038216820361025757565b908151602081105f1461030c575090601f8151116102cc5760208151910151602082106102bd571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161024357600254600181811c91168015610423575b602082101461040f57601f81116103dc575b50602092601f821160011461037b57928192935f92610370575b50508160011b915f199060031b1c19161760025560ff90565b015190505f80610357565b601f1982169360025f52805f20915f5b8681106103c457508360019596106103ac575b505050811b0160025560ff90565b01515f1960f88460031b161c191690555f808061039e565b9192602060018192868501518155019401920161038b565b60025f52601f60205f20910160051c810190601f830160051c015b818110610404575061033d565b5f81556001016103f7565b634e487b7160e01b5f52602260045260245ffd5b90607f169061032b565b908151602081105f14610458575090601f8151116102cc5760208151910151602082106102bd571790565b6001600160401b03811161024357600354600181811c9116801561055b575b602082101461040f57601f8111610528575b50602092601f82116001146104c757928192935f926104bc575b50508160011b915f199060031b1c19161760035560ff90565b015190505f806104a3565b601f1982169360035f52805f20915f5b86811061051057508360019596106104f8575b505050811b0160035560ff90565b01515f1960f88460031b161c191690555f80806104ea565b919260206001819286850151815501940192016104d7565b60035f52601f60205f20910160051c810190601f830160051c015b8181106105505750610489565b5f8155600101610543565b90607f169061047756fe6080806040526004361015610012575f80fd5b5f905f3560e01c908163238ac933146110ba5750806336dad98c146110285780633a5be8cb14610faa57806353bb8ed214610f4257806368c4ac2614610dfa5780636b02060f1461061e5780636c19e783146105b6578063715018a61461055d5780637bce887a1461049a57806384b0196e1461039e5780638da5cb5b146103775780639b61d2d81461033c578063a4b672b6146102f8578063afdac3d6146102d1578063c48919d61461018e578063d37654dc146101515763f2fde38b146100d9575f80fd5b3461014e57602036600319011261014e576001600160a01b036100fa6110dd565b6101026116a6565b16801561014c576001600160a01b03600154826001600160a01b0319821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b505b80fd5b503461014e57602036600319011261014e5760ff60406020926001600160a01b0361017a6110dd565b168152600784522054166040519015158152f35b503461014e57606036600319011261014e57806101a96110dd565b6024356001600160401b0381168091036102cd5761022d9161023b916001600160401b0360206101f06101da6110f3565b946101e36116a6565b6101eb611480565b611925565b0151166001600160a01b0360405193166020840152604083015260608201526060815261021e6080826111b9565b604051928391602083016123be565b03601f1981018352826111b9565b7333333333333333333333333333333333333333333b156102ca578161027d91604051809381926317938e1360e01b83526020600484015260248301906113e8565b0381837333333333333333333333333333333333333333335af180156102bf576102aa575b506001905580f35b816102b4916111b9565b61014e57805f6102a2565b6040513d84823e3d90fd5b50fd5b5050fd5b503461014e578060031936011261014e5760206001600160a01b0360065416604051908152f35b503461014e578060031936011261014e5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461014e576103706001600160a01b036103563661141d565b916103629391936116a6565b61036a611480565b1661172f565b6001815580f35b503461014e578060031936011261014e5760206001600160a01b0360015416604051908152f35b503461014e578060031936011261014e5761043e906103dc7f0000000000000000000000000000000000000000000000000000000000000000611770565b906104067f000000000000000000000000000000000000000000000000000000000000000061186d565b90602061044c6040519361041a83866111b9565b8385525f368137604051968796600f60f81b885260e08589015260e08801906113e8565b9086820360408801526113e8565b904660608601523060808601528260a086015284820360c08601528080855193848152019401925b82811061048357505050500390f35b835185528695509381019392810192600101610474565b5034610559576104a93661141d565b6104b49392936116a6565b6104bc611480565b6001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016941693803b156105595760405163f3fef3a360e01b81526001600160a01b038616600482015260248101849052905f908290604490829084905af1801561054e57610538575b50610370929361172f565b61037093505f610547916111b9565b5f9261052d565b6040513d5f823e3d90fd5b5f80fd5b34610559575f366003190112610559576105756116a6565b5f6001600160a01b036001546001600160a01b03198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610559576020366003190112610559577f9eaa897564d022fb8c5efaf0acdb5d9d27b440b2aad44400b6e1c702e65b9ed360206001600160a01b036105fa6110dd565b6106026116a6565b16806001600160a01b03196005541617600555604051908152a1005b346105595760a0366003190112610559576106376110dd565b6024359063ffffffff821682036105595760443591821515809303610559576064356001600160401b03811690818103610559576084356001600160401b038116809103610559576106876116a6565b61068f6116f8565b506106986116ba565b505f80604051602081019063ffffffff88168252602081526106bb6040826111b9565b519061080c5afa916106cb61232a565b9215610deb57825183016020810193602081830312610559576020810151906001600160401b0382116105595701906101009082900312610559576040519361071385611182565b60208201516001600160401b0381116105595760209083010181601f820112156105595780516107428161148f565b9161075060405193846111b9565b818352836020838301011161055957815f9260208093018386015e83010152855260408201516001600160401b038111610559576020908301019080601f83011215610559578151916001600160401b038311610c8b578260051b9060208201936107be60405195866111b9565b845260208085019282010192831161055957602001905b828210610dd3575050506020850152610100906107f460608201612359565b60408601526108056080820161236d565b606086015261081660a0820161236d565b608086015261082760c08201612381565b60a086015261083860e08201612381565b60c08601520151805f0b808203610559578160e086015280155f14610d485750508390505b6040519261086a8461119e565b8352602083019363ffffffff861685526040840197885260608401918252608084015260a083019182526001600160a01b0386165f52600460205260405f209383519788518051906001600160401b038211610c8b5781906108cc895461114a565b601f8111610d0d575b50602090601f8311600114610caa575f92610c9f575b50508160011b915f199060031b1c19161786555b600186019860208101518051906001600160401b038211610c8b57680100000000000000008211610c8b576020908c8054848255808510610c3f575b5050019a5f5260205f208160021c915f5b838110610bea57506003198116900380610b79575b507fa77e0bbc99604ba7659ef7e5ba24248de412639958fdada71348bf6567a3c85060808c8c8c63ffffffff60e08e8e60068f8f8f8f60028a016001600160401b0380604084015116166001600160401b031982541617815560608201517fffffffff0000000000000000000000000000000000000000ffffffffffffffff7bffffffffffffffffffffffffffffffffffffffff000000000000000083549260401b16911617905560038a01906001600160a01b038e820151166001600160a01b031983541617825560a08101519082547fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008c75ff00000000000000000000000000000000000000000060c086015160a81b1694015160b01b76ff00000000000000000000000000000000000000000000169460a01b16911617171790556001600160401b038060048b01935116166001600160401b031983541617825551151568ff000000000000000082549160401b169068ff00000000000000001916179055519586600582015501906001600160401b03808a85015116166001600160401b0319835416178255516fffffffffffffffff000000000000000082549160401b16906fffffffffffffffff000000000000000019161790555101515f0b926001600160a01b036040519516855216602084015260408301526060820152a1005b9b5f9c5f5b818110610bbb5750505001999099557fa77e0bbc99604ba7659ef7e5ba24248de412639958fdada71348bf6567a3c85098838363ffffffff610961565b82516001600160401b03908116600683901b90811b91901b19909f169e909e179d602090920191600101610b7e565b5f5f5b60048110610c0257508382015560010161094c565b9e908f610c366020916001936001600160401b038651169160031b6001600160401b03809160031b9316831b921b19161790565b92019f01610bed565b610c6b915f52835f20600380870160021c820192601888831b1680610c72575b500160021c0190611457565b8c8e61093b565b5f198501908154905f19908a03851b1c1690555f610c5f565b634e487b7160e01b5f52604160045260245ffd5b015190508b806108eb565b5f8a81528281209350601f198516905b818110610cf55750908460019594939210610cdd575b505050811b0186556108ff565b01515f1960f88460031b161c191690558b8080610cd0565b92936020600181928786015181550195019301610cba565b610d38908a5f5260205f20601f850160051c81019160208610610d3e575b601f0160051c0190611457565b8c6108d5565b9091508190610d2b565b5f811315610d6d5750610d60610d669160ff1661238f565b8561146d565b905061085d565b915050607f198114610dbf57610d87905f0360ff1661238f565b610d918185611a72565b5f198101908111610dbf57610db8610db1836001600160401b03936123a0565b928361146d565b505061085d565b634e487b7160e01b5f52601160045260245ffd5b60208091610de084612359565b8152019101906107d5565b639b0c335d60e01b5f5260045ffd5b34610559576020366003190112610559576001600160a01b03610e1b6110dd565b165f52600460205260405f20610e30816111da565b60048201549060066005840154930154926040519260c08452610e61835161010060c08701526101c08601906113e8565b60208085015186830360bf190160e0880152805180845292820195929101905f5b818110610f23575050509160ff85969260e0856001600160401b03604081980151166101008a01526001600160a01b036060820151166101208a01526001600160a01b036080820151166101408a01528360a0820151166101608a01528360c0820151166101808a015201515f0b6101a0880152848116602088015260401c16151560408601526060850152818116608085015260401c1660a08301520390f35b82516001600160401b0316875260209687019690920191600101610e82565b34610559576020366003190112610559577f4c8b836de1da4e6603d31c25201f9984652ee9e7118d41e0a1cb168a5ba97e5360206001600160a01b03610f866110dd565b610f8e6116a6565b16806001600160a01b03196006541617600655604051908152a1005b3461055957608036600319011261055957610fc36110dd565b610fcb6110f3565b506064356001600160401b03811161055957610feb90369060040161111d565b90610ff4611480565b6001600160a01b036006541633036110195761101392602435906114aa565b60015f55005b63051ec6a160e41b5f5260045ffd5b34610559576060366003190112610559576110416110dd565b602435604435916001600160401b0383116105595761106761101393369060040161111d565b929091611072611480565b6110b56040516323b872dd60e01b6020820152336024820152306044820152836064820152606481526110a66084826111b9565b6001600160a01b0383166119d9565b6114aa565b34610559575f366003190112610559576020906001600160a01b03600554168152f35b600435906001600160a01b038216820361055957565b604435906001600160a01b038216820361055957565b35906001600160a01b038216820361055957565b9181601f84011215610559578235916001600160401b038311610559576020838186019501011161055957565b90600182811c92168015611178575b602083101461116457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611159565b61010081019081106001600160401b03821117610c8b57604052565b60c081019081106001600160401b03821117610c8b57604052565b90601f801991011681019081106001600160401b03821117610c8b57604052565b906040516111e781611182565b80926040515f818354916111fa8361114a565b80835292600181169081156113c95750600114611388575b61121e925003826111b9565b8252600181016040519081602082549182815201915f5260205f20905f915b81600384011061133c579360e09593819361127d936003975491818110611322575b818110611305575b8181106112e8575b106112da575b5003826111b9565b60208501526001600160a01b0360028201546001600160401b038116604087015260401c16606085015201546001600160a01b038116608084015260ff8160a01c1660a084015260ff8160a81c1660c084015260b01c5f0b910152565b60c01c81526020015f611275565b9260206001916001600160401b038560801c16815201930161126f565b9260206001916001600160401b038560401c168152019301611267565b9260206001916001600160401b038516815201930161125f565b926001608060049286546001600160401b03811682526001600160401b038160401c1660208301526001600160401b0381841c16604083015260c01c606082015201940192019161123d565b5090835f5260205f20905f915b8183106113ad57505090602061121e92820101611212565b6020919350806001915483858801015201910190918392611395565b6020925061121e94915060ff191682840152151560051b820101611212565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b359063ffffffff8216820361055957565b6060906003190112610559576004356001600160a01b03811681036105595790602435906044356001600160a01b03811681036105595790565b818110611462575050565b5f8155600101611457565b81810292918115918404141715610dbf57565b60025f54146105595760025f55565b6001600160401b038111610c8b57601f01601f191660200190565b929092811561169257823560f81c916003831015611672575f83158015611686575b156115185750806001116105595760409084018490035f19011261055957611516936001600160a01b0361150e602161150760018801611109565b960161140c565b941691611a7f565b565b949194611672576002830361166357806001116105595783019060608483035f1901126105595761154b60018501611109565b6115576021860161140c565b946041810135906001600160401b038211610559570183602082011215610559576001810135906115878261148f565b9461159560405196876111b9565b8286526021828401011161055957611637925f60208461162f9560216001600160a01b039601838b0137880101521693604260405160208101907f64e4cc036ce419bbb6b0f6ac87c300d6351aab7073fa1198f6b9b54967ac34e18252876040820152604081526116076060826111b9565b519020611612612483565b906040519161190160f01b8352600283015260228201522061259f565b9190916125d4565b6001600160a01b0380600554169116036116545761151694611a7f565b638baa579f60e01b5f5260045ffd5b63735a9c4b60e01b5f5260045ffd5b634e487b7160e01b5f52602160045260245ffd5b50505f600184146114cc565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b0360015416330361055957565b604051906116c782611182565b5f60e08360608152606060208201528260408201528260608201528260808201528260a08201528260c08201520152565b604051906117058261119e565b5f60a0836117116116ba565b81528260208201528260408201528260608201528260808201520152565b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526115169161176b6064836111b9565b6119d9565b60ff81146117b65760ff811690601f82116117a757604051916117946040846111b9565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600254815f6117c88361114a565b808352926001811690811561184e57506001146117ef575b6117ec925003826111b9565b90565b5060025f90815290917f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8183106118325750509060206117ec928201016117e0565b602091935080600191548385880101520191019091839261181a565b602092506117ec94915060ff191682840152151560051b8201016117e0565b60ff81146118915760ff811690601f82116117a757604051916117946040846111b9565b50604051600354815f6118a38361114a565b808352926001811690811561184e57506001146118c6576117ec925003826111b9565b5060035f90815290917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8183106119095750509060206117ec928201016117e0565b60209193508060019154838588010152019101909183926118f1565b6001600160a01b03906119366116f8565b5016805f5260046020526001600160a01b03600360405f20015416156119bd575f52600460205260405f206001600160401b036006604051926119788461119e565b611981816111da565b845260ff6004820154848116602087015260401c1615156040850152600581015460608501520154818116608084015260401c1660a082015290565b633dd1b30560e01b5f5260045ffd5b5190811515820361055957565b906001600160a01b03611a3a92165f80604051936119f86040866111b9565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602086015260208151910182855af1611a3461232a565b9161262c565b8051908115918215611a50575b50501561055957565b8192509060209181010312610559576020611a6b91016119cc565b5f80611a47565b91908201809211610dbf57565b919093611a8b83611925565b9060e0825101515f905f0b87604051975f8060208b016001600160a01b038a169b8c825260208152611abe6040826111b9565b51906108105afa611acd61232a565b901561231b576020818051810103126105595760405190602082018281106001600160401b03821117610c8b57604052611b09906020016119cc565b809152159687612271575b611b1e848c6123e0565b93905060208801936001600160401b038551165f806001600160401b0360a08d01511692611b4b81612606565b90604051906001600160a01b036020830193168352604082015260408152611b746060826111b9565b51906108015afa91611b8461232a565b921561226257606083805181010312610559576040519060608201918083106001600160401b03841117610c8b576001600160401b03926040526040611beb6060611bd160208901612359565b97888552611be0848201612359565b602086015201612359565b91015216016001600160401b038111610dbf576001600160401b038091169116106122165750505f955f97612138575b5050906001600160401b03611c32925116986123e0565b926001600160401b03851698896001600160401b03861611156121295782611cb1575b50505050926001600160401b03606093611c986001600160a01b03947f7ae87c09cb0dd9523c9e95074add887b3a9112ec40a2b689ed19167ef502098797612463565b97826040519916895260208901521660408701521693a3565b80611f4957506001600160a01b03871660405184806020830163095ea7b360e01b8152736b9e773128f453f5c2c60935ee2de2cbc5390a24602485015286604485015260448452611d036064856111b9565b83519082865af1611d1261232a565b81611f0e575b5080611f04575b15611eb1575b5050308803611df357736b9e773128f453f5c2c60935ee2de2cbc5390a243b15611def57604051630acb7f4b60e21b8152600481019290925263ffffffff166024820152818160448183736b9e773128f453f5c2c60935ee2de2cbc5390a245af180156102bf57611dda575b5050926001600160401b03606093611c986001600160a01b03947f7ae87c09cb0dd9523c9e95074add887b3a9112ec40a2b689ed19167ef5020987975b94975094829650611c55565b611de58280926111b9565b61014e5780611d91565b8280fd5b736b9e773128f453f5c2c60935ee2de2cbc5390a243b15611def5763ffffffff906040519263611e2a2d60e11b84528960048501526024840152166044820152818160648183736b9e773128f453f5c2c60935ee2de2cbc5390a245af180156102bf57611e9c575b5050926001600160401b03606093611c986001600160a01b03947f7ae87c09cb0dd9523c9e95074add887b3a9112ec40a2b689ed19167ef502098797611dce565b611ea78280926111b9565b61014e5780611e5b565b611efd9161176b60405163095ea7b360e01b6020820152736b9e773128f453f5c2c60935ee2de2cbc5390a24602482015287604482015260448152611ef76064826111b9565b826119d9565b5f80611d25565b50813b1515611d1f565b8051801592508215611f23575b50505f611d18565b8192509060209181010312611f45576020611f3e91016119cc565b5f80611f1b565b8580fd5b91611f6690611f5784612606565b6001600160a01b038a1661172f565b308814801590612119575b611fb8575b505050926001600160401b03606093611c986001600160a01b03947f7ae87c09cb0dd9523c9e95074add887b3a9112ec40a2b689ed19167ef502098797611dce565b63ffffffff611fc78686612463565b911663ffffffff811480612111575b15612092575061022d916001600160401b0361201092604051928b602085015260408401521660608201526060815261021e6080826111b9565b7333333333333333333333333333333333333333333b1561014c578161205291604051809381926317938e1360e01b83526020600484015260248301906113e8565b0381837333333333333333333333333333333333333333335af180156102bf5761207d575b80611f76565b6120888280926111b9565b61014e5780612077565b6001600160401b0361210c92602094604051938c8786015287604086015263ffffffff6060860152608085015260a08401521660c082015260c081526120d960e0826111b9565b600460405193849281840190630100000d60e01b82528051928391018483015e01015f815203601f1981018352826111b9565b612010565b506001611fd6565b5063ffffffff8082161415611f71565b6306506d5560e11b8452600484fd5b5f8a8152600760205260409020805460ff1916600117905560808101516001600160401b0316965090600381101561167257600214612178575b80611c1b565b606001519095507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156105595760405163f3fef3a360e01b81526001600160a01b038916600482015260248101929092525f908290604490829084905af1801561054e576121ff575b5092938493906001600160401b03612172565b61220c9192505f906111b9565b5f90611c326121ec565b96509950505050505060209150612259816001600160a01b037fb69bc8d6c6fed5bf3260f4ab1f94c18d8d7e7edd53e85482821bf22ab61ce06a9516968761172f565b604051908152a3565b639d2c8fcb60e01b5f5260045ffd5b99600382101561167257811561230c576040870151156122fd57895f52600760205260ff60405f2054166122ee57600282036122bc57506122b6606087015183611a72565b99611b14565b996122c784846123e0565b90506001600160401b038060808a015116911611611b145763707a492560e01b5f5260045ffd5b63172741e160e01b5f5260045ffd5b630ac34de960e01b5f5260045ffd5b638b2d97f960e01b5f5260045ffd5b6313dd7ccd60e31b5f5260045ffd5b3d15612354573d9061233b8261148f565b9161234960405193846111b9565b82523d5f602084013e565b606090565b51906001600160401b038216820361055957565b51906001600160a01b038216820361055957565b519060ff8216820361055957565b60ff16604d8111610dbf57600a0a90565b81156123aa570490565b634e487b7160e01b5f52601260045260245ffd5b6280000360e11b8152815160049290919082906020018483015e01015f815290565b9190805f0b9081155f1461240c575050815b6001600160401b038111610559576001600160401b031690565b5f82131561244257612421915060ff1661238f565b80156123aa578083068303928311610dbf5761243d90836123a0565b6123f2565b505f0380805f0b03610dbf5761245d61243d9160ff1661238f565b8361146d565b906001600160401b03809116911603906001600160401b038211610dbf57565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016301480612576575b156124de577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261257060c0826111b9565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146124b5565b9060418151145f146125cb576125c791602082015190606060408401519301515f1a90612657565b9091565b50505f90600290565b600581101561167257806125e55750565b600181036125f1575f80fd5b600281036125fd575f80fd5b60031461055957565b6001600160401b03166001609d1b01806001609d1b11610dbf576001600160a01b031690565b919250156126485781511561263f575090565b3b156105595790565b50805190811561055957602001fd5b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084116126c7576020935f9360ff60809460405194855216868401526040830152606082015282805260015afa1561054e575f516001600160a01b038116156126bf57905f90565b505f90600190565b505050505f9060039056fea264697066735822122052dbbe35410b113dbf0a02a05f43dfd84fcf30ad8e50e8c7712b5cc578fe69a764736f6c634300081e0033608080604052346059575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610320908161005e8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c908163715018a6146102265781638da5cb5b1461020457508063f2fde38b146101845763f3fef3a314610048575f80fd5b3461013c57604036600319011261013c576004356001600160a01b03811680910361013c5761007561028a565b6040515f806020830163a9059cbb60e01b81523360248501526024356044850152604484526100a560648561029d565b604051936100b460408661029d565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082865af13d15610177573d9067ffffffffffffffff821161016357604051610126949092610118601f8201601f19166020018561029d565b83523d5f602085013e6102bf565b8051908115918215610140575b50501561013c57005b5f80fd5b819250906020918101031261013c5760200151801515810361013c575f80610133565b634e487b7160e01b5f52604160045260245ffd5b91610126926060916102bf565b3461013c57602036600319011261013c576004356001600160a01b03811680910361013c576101b161028a565b801561013c576001600160a01b035f548273ffffffffffffffffffffffffffffffffffffffff198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b3461013c575f36600319011261013c576020906001600160a01b035f54168152f35b3461013c575f36600319011261013c5761023e61028a565b5f6001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b6001600160a01b035f5416330361013c57565b90601f8019910116810190811067ffffffffffffffff82111761016357604052565b919250156102db578151156102d2575090565b3b1561013c5790565b50805190811561013c57602001fdfea2646970667358221220c9c51f68ce7606df2f0693af64a63d7680118aef9dba9c271fd5439c59cec40e64736f6c634300081e00330000000000000000000000009a8f92a830a5cb89a3816e3d267cb7791c16b04d00000000000000000000000035e63ea3eb0fb7a3bc543c71fb66412e1f6b0e04", + "nonce": "0x570", "chainId": "0x3e7" }, "additionalContracts": [ { "transactionType": "CREATE", - "address": "0x59ee1342867c200fa8ac052faa5f3df8eef21a67", - "initCode": "0x6080806040523461005a575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610344908161005f8239f35b5f80fdfe608060409080825260049081361015610016575f80fd5b5f3560e01c908163715018a61461026e5781638da5cb5b1461024c57508063f2fde38b146101d45763f3fef3a31461004c575f80fd5b346101545781600319360112610154578035916001600160a01b0383168093036101545760249261007b6102d2565b8151916020830163a9059cbb60e01b815233868501528535604485015260448452608084019367ffffffffffffffff94818110868211176101c25760c08201818110878211176101b0578452602090527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460a0820152515f9182919082865af1923d1561019f573d9181831161018d57805195601f8401601f19908116603f011687019283118784101761017b575052835261013e93503d5f602085013e6102e5565b8051908115918215610158575b50501561015457005b5f80fd5b819250906020918101031261015457602001518015158103610154575f8061014b565b60418891634e487b7160e01b5f52525ffd5b86604187634e487b7160e01b5f52525ffd5b5050915061013e92506060916102e5565b88604189634e487b7160e01b5f52525ffd5b87604188634e487b7160e01b5f52525ffd5b503461015457602036600319011261015457356001600160a01b03808216809203610154576102016102d2565b8115610154575f548273ffffffffffffffffffffffffffffffffffffffff198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b34610154575f366003190112610154576020906001600160a01b035f54168152f35b34610154575f366003190112610154576102866102d2565b5f6001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b6001600160a01b035f5416330361015457565b90156102ff578151156102f6575090565b3b156101545790565b50805190811561015457602001fdfea2646970667358221220c55691de465342d56d68c31160f5d7d661422ef39ebccaa5223872c823ad6d6964736f6c63430008180033" + "contractName": "DonationBox", + "address": "0xbb0b45301876a8fcc98c5c0f43d74de0cd1ed851", + "initCode": "0x608080604052346059575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610320908161005e8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c908163715018a6146102265781638da5cb5b1461020457508063f2fde38b146101845763f3fef3a314610048575f80fd5b3461013c57604036600319011261013c576004356001600160a01b03811680910361013c5761007561028a565b6040515f806020830163a9059cbb60e01b81523360248501526024356044850152604484526100a560648561029d565b604051936100b460408661029d565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082865af13d15610177573d9067ffffffffffffffff821161016357604051610126949092610118601f8201601f19166020018561029d565b83523d5f602085013e6102bf565b8051908115918215610140575b50501561013c57005b5f80fd5b819250906020918101031261013c5760200151801515810361013c575f80610133565b634e487b7160e01b5f52604160045260245ffd5b91610126926060916102bf565b3461013c57602036600319011261013c576004356001600160a01b03811680910361013c576101b161028a565b801561013c576001600160a01b035f548273ffffffffffffffffffffffffffffffffffffffff198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b3461013c575f36600319011261013c576020906001600160a01b035f54168152f35b3461013c575f36600319011261013c5761023e61028a565b5f6001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b6001600160a01b035f5416330361013c57565b90601f8019910116810190811067ffffffffffffffff82111761016357604052565b919250156102db578151156102d2575090565b3b1561013c5790565b50805190811561013c57602001fdfea2646970667358221220c9c51f68ce7606df2f0693af64a63d7680118aef9dba9c271fd5439c59cec40e64736f6c634300081e0033" } ], "isFixedGasLimit": false - }, - { - "hash": "0xafaa7c3ef97727b20d46e5cb7f6478ab2e3597d7426aa0b007e52e016aa0cb8f", - "transactionType": "CALL", - "contractName": null, - "contractAddress": "0x3333333333333333333333333333333333333333", - "function": "sendRawAction(bytes)", - "arguments": [ - "0x01000006000000000000000000000000861e127036b28d32f3777b4676f6bbb9e007d19500000000000000000000000000000000000000000000000000000000000001680000000000000000000000000000000000000000000000000000000000000001" - ], - "transaction": { - "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", - "to": "0x3333333333333333333333333333333333333333", - "gas": "0x1039d", - "value": "0x0", - "input": "0x17938e130000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006401000006000000000000000000000000861e127036b28d32f3777b4676f6bbb9e007d1950000000000000000000000000000000000000000000000000000000000000168000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000", - "nonce": "0x207", - "chainId": "0x3e7" - }, - "additionalContracts": [], - "isFixedGasLimit": false - }, - { - "hash": "0xea620a26dd14c70920861794ebb4ad4ed9e20eaa0a9e4a8dd076bc5e6e978c12", - "transactionType": "CALL", - "contractName": "HyperliquidDepositHandler", - "contractAddress": "0x861e127036b28d32f3777b4676f6bbb9e007d195", - "function": "addSupportedToken(address,uint64,uint256,int8)", - "arguments": ["0x111111a1a0667d36bD57c0A9f569b98057111111", "360", "1000000", "-2"], - "transaction": { - "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", - "to": "0x861e127036b28d32f3777b4676f6bbb9e007d195", - "gas": "0x1ed4c", - "value": "0x0", - "input": "0x3eda20c6000000000000000000000000111111a1a0667d36bd57c0a9f569b98057111111000000000000000000000000000000000000000000000000000000000000016800000000000000000000000000000000000000000000000000000000000f4240fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe", - "nonce": "0x208", - "chainId": "0x3e7" - }, - "additionalContracts": [], - "isFixedGasLimit": false } ], "receipts": [ { "status": "0x1", - "cumulativeGasUsed": "0x10eee8", + "cumulativeGasUsed": "0x26f557", "logs": [ { - "address": "0x861e127036b28d32f3777b4676f6bbb9e007d195", + "address": "0xbfb53e9c8acce6d6ac54885a8e33a7aec95427d5", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000009a8f92a830a5cb89a3816e3d267cb7791c16b04d" ], "data": "0x", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "blockTimestamp": "0x6927e55c", - "transactionHash": "0x187b45f39be413aff2ff526946c64f76ed98763129e7e2ffb7d2d4c5bd997519", + "blockHash": "0x5132eb584a80db4abdbe57b0355b898210bc0ff9209d4407366db8d8f324add5", + "blockNumber": "0x19e3270", + "blockTimestamp": "0x698e9cd4", + "transactionHash": "0xf7f1b77559935ec04f3a3a89601b621f21d4cf38c2701e8df18e10f333b24c7c", "transactionIndex": "0x0", "logIndex": "0x0", "removed": false }, { - "address": "0x59ee1342867c200fa8ac052faa5f3df8eef21a67", + "address": "0xbb0b45301876a8fcc98c5c0f43d74de0cd1ed851", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000861e127036b28d32f3777b4676f6bbb9e007d195" + "0x000000000000000000000000bfb53e9c8acce6d6ac54885a8e33a7aec95427d5" ], "data": "0x", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "blockTimestamp": "0x6927e55c", - "transactionHash": "0x187b45f39be413aff2ff526946c64f76ed98763129e7e2ffb7d2d4c5bd997519", + "blockHash": "0x5132eb584a80db4abdbe57b0355b898210bc0ff9209d4407366db8d8f324add5", + "blockNumber": "0x19e3270", + "blockTimestamp": "0x698e9cd4", + "transactionHash": "0xf7f1b77559935ec04f3a3a89601b621f21d4cf38c2701e8df18e10f333b24c7c", "transactionIndex": "0x0", "logIndex": "0x1", "removed": false } ], - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000020000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000040000002000000000080020000000020000000000800000000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000080000000100008000000000000020000001000000000000000000000000000000000000000000000000000000000000", + "logsBloom": "0x00000000000000000000200000000040000000000000000000800000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000040000000000020000000000000000000800008000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000800000000000000000000000000000000000000000000020000001000000000000000000000000020001000020000000000000000000000000", "type": "0x2", - "transactionHash": "0x187b45f39be413aff2ff526946c64f76ed98763129e7e2ffb7d2d4c5bd997519", + "transactionHash": "0xf7f1b77559935ec04f3a3a89601b621f21d4cf38c2701e8df18e10f333b24c7c", "transactionIndex": "0x0", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "gasUsed": "0x10eee8", - "effectiveGasPrice": "0x23c34600", + "blockHash": "0x5132eb584a80db4abdbe57b0355b898210bc0ff9209d4407366db8d8f324add5", + "blockNumber": "0x19e3270", + "gasUsed": "0x26f557", + "effectiveGasPrice": "0x8eaf3a77", "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", "to": null, - "contractAddress": "0x861e127036b28d32f3777b4676f6bbb9e007d195" - }, - { - "status": "0x1", - "cumulativeGasUsed": "0x11aadd", - "logs": [ - { - "address": "0x3333333333333333333333333333333333333333", - "topics": [ - "0x8c7f585fb295f7eb1e6aeb8fba61b23a4fe60beda405f0045073b185c74412e3", - "0x0000000000000000000000009a8f92a830a5cb89a3816e3d267cb7791c16b04d" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006401000006000000000000000000000000861e127036b28d32f3777b4676f6bbb9e007d1950000000000000000000000000000000000000000000000000000000000000168000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "blockTimestamp": "0x6927e55c", - "transactionHash": "0xafaa7c3ef97727b20d46e5cb7f6478ab2e3597d7426aa0b007e52e016aa0cb8f", - "transactionIndex": "0x1", - "logIndex": "0x2", - "removed": false - } - ], - "logsBloom": "0x00000000020000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000004000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000004000000000000000010000000000001000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xafaa7c3ef97727b20d46e5cb7f6478ab2e3597d7426aa0b007e52e016aa0cb8f", - "transactionIndex": "0x1", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "gasUsed": "0xbbf5", - "effectiveGasPrice": "0x23c34600", - "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", - "to": "0x3333333333333333333333333333333333333333", - "contractAddress": null - }, - { - "status": "0x1", - "cumulativeGasUsed": "0x131001", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xea620a26dd14c70920861794ebb4ad4ed9e20eaa0a9e4a8dd076bc5e6e978c12", - "transactionIndex": "0x2", - "blockHash": "0x0a8f06eb397fdab2e4392e16237ee54d6f6fe244e7ae4c021885998578c4cfe0", - "blockNumber": "0x135c76f", - "gasUsed": "0x16524", - "effectiveGasPrice": "0x23c34600", - "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", - "to": "0x861e127036b28d32f3777b4676f6bbb9e007d195", - "contractAddress": null + "contractAddress": "0xbfb53e9c8acce6d6ac54885a8e33a7aec95427d5" } ], "libraries": [], "pending": [], "returns": {}, - "timestamp": 1764222354052, + "timestamp": 1770953941874, "chain": 999, - "commit": "1397709" + "commit": "75cb2850" } diff --git a/broadcast/deployed-addresses.json b/broadcast/deployed-addresses.json index 9903a232e..58d22ce35 100644 --- a/broadcast/deployed-addresses.json +++ b/broadcast/deployed-addresses.json @@ -515,9 +515,9 @@ "transaction_hash": "0x7ce545552d4a517bc380951ec35bd5eb86f84e0364a7ac9417aba605b8bf6309" }, "HyperliquidDepositHandler": { - "address": "0x861e127036b28d32f3777b4676f6bbb9e007d195", - "block_number": 20301679, - "transaction_hash": "0x187b45f39be413aff2ff526946c64f76ed98763129e7e2ffb7d2d4c5bd997519" + "address": "0xbfb53e9c8acce6d6ac54885a8e33a7aec95427d5", + "block_number": 27144816, + "transaction_hash": "0xf7f1b77559935ec04f3a3a89601b621f21d4cf38c2701e8df18e10f333b24c7c" }, "SponsoredCCTPDstPeriphery": { "address": "0x1c709fd0db6a6b877ddb19ae3d485b7b4add879f", diff --git a/broadcast/deployed-addresses.md b/broadcast/deployed-addresses.md index 1fb18f6ed..969b1088a 100644 --- a/broadcast/deployed-addresses.md +++ b/broadcast/deployed-addresses.md @@ -162,7 +162,7 @@ This file contains the latest deployed smart contract addresses from the broadca | DonationBox | [0x3D589D40312Bf2d20f13cD0AF26A11144a9cA844](https://hyperevmscan.io//address/0x3D589D40312Bf2d20f13cD0AF26A11144a9cA844) | | DonationBox | [0x039d62C549F27ead0eB9B567d8776289e5020583](https://hyperevmscan.io//address/0x039d62C549F27ead0eB9B567d8776289e5020583) | | DstOFTHandler | [0xc8786D517b4e224bB43985A38dBeF8588D7354CD](https://hyperevmscan.io//address/0xc8786D517b4e224bB43985A38dBeF8588D7354CD) | -| HyperliquidDepositHandler | [0x861E127036B28D32f3777B4676F6bbb9e007d195](https://hyperevmscan.io//address/0x861E127036B28D32f3777B4676F6bbb9e007d195) | +| HyperliquidDepositHandler | [0xbFB53E9C8acCe6D6aC54885A8e33A7Aec95427D5](https://hyperevmscan.io//address/0xbFB53E9C8acCe6D6aC54885A8e33A7Aec95427D5) | | MulticallHandler | [0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba](https://hyperevmscan.io//address/0x5E7840E06fAcCb6d1c3b5F5E0d1d3d07F2829bba) | | PermissionedMulticallHandler | [0xfD0876712DD9003D014CDCd8e5140B4EFAC9BFCC](https://hyperevmscan.io//address/0xfD0876712DD9003D014CDCd8e5140B4EFAC9BFCC) | | SP1Helios | [0xc19B7EF43a6eBd393446F401d1eCFac01B181ac0](https://hyperevmscan.io//address/0xc19B7EF43a6eBd393446F401d1eCFac01B181ac0) | diff --git a/script/DeployHyperliquidDepositHandler.s.sol b/script/DeployHyperliquidDepositHandler.s.sol index 6005997b9..4c898c9fb 100644 --- a/script/DeployHyperliquidDepositHandler.s.sol +++ b/script/DeployHyperliquidDepositHandler.s.sol @@ -2,60 +2,143 @@ pragma solidity ^0.8.0; import { Script } from "forge-std/Script.sol"; -import { Test } from "forge-std/Test.sol"; import { console } from "forge-std/console.sol"; import { HyperliquidDepositHandler } from "../contracts/handlers/HyperliquidDepositHandler.sol"; -import { HyperCoreLib } from "../contracts/libraries/HyperCoreLib.sol"; -import { IERC20 } from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; +import { ReadHCoreTokenInfoUtil } from "./mintburn/ReadHCoreTokenInfoUtil.s.sol"; +import { DeployedAddresses } from "./utils/DeployedAddresses.sol"; +import { SafeCast } from "@openzeppelin/contracts-v4/utils/math/SafeCast.sol"; -// How to run: -// forge script script/DeployHyperliquidDepositHandler.s.sol:DeployHyperliquidDepositHandler --rpc-url hyperevm -vvvv +/* +How to run: -contract DeployHyperliquidDepositHandler is Script, Test { - function run() external { - string memory deployerMnemonic = vm.envString("MNEMONIC"); - uint256 deployerPrivateKey = vm.deriveKey(deployerMnemonic, 0); - // Set the initial signer to the deployer's address. - address signer = vm.addr(deployerPrivateKey); +TOKENS_JSON='["usdt0","usdc","usdh"]' +TOKENS_ENCODED=$(cast abi-encode "f(string[])" "$TOKENS_JSON") - address spokePool = 0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04; +# signer defaults to deployer +forge script script/DeployHyperliquidDepositHandler.s.sol:DeployHyperliquidDepositHandler \ + --sig "run(string)" "$TOKENS_ENCODED" --rpc-url hyperevm -vvvv --broadcast - // Get the current chain ID - uint256 chainId = block.chainid; +# explicit signer override (pass zero address to use deployer) +SIGNER=0x1111111111111111111111111111111111111111 +forge script script/DeployHyperliquidDepositHandler.s.sol:DeployHyperliquidDepositHandler \ + --sig "run(string,address)" "$TOKENS_ENCODED" $SIGNER --rpc-url hyperevm -vvvv --broadcast +*/ - // Set up USDH as a supported token for this handler. - IERC20 usdh = IERC20(0x111111a1a0667d36bD57c0A9f569b98057111111); - uint32 usdhTokenIndex = 360; - uint64 usdhActivationFeeCore = 10000; // 1 USDH in Core units (4 szDecimals) - uint64 usdhBridgeSafetyBufferCore = 0; // No buffer for now +contract DeployHyperliquidDepositHandler is Script, DeployedAddresses { + using SafeCast for uint256; - vm.startBroadcast(deployerPrivateKey); + string internal constant SPOKE_POOL_NAME = "SpokePool"; + string internal constant ADD_SUPPORTED_TOKEN_SIG = "addSupportedToken(address,uint32,bool,uint64,uint64)"; - HyperliquidDepositHandler hyperliquidDepositHandler = new HyperliquidDepositHandler(signer, spokePool); + struct TokenConfig { + string symbol; + address evmAddress; + uint32 coreIndex; + bool canBeUsedForAccountActivation; + uint64 accountActivationFeeCore; + uint64 bridgeSafetyBufferCore; + } + + function run() external pure { + revert("Missing args. Use run(string encodedTokenSymbols[, address signer])"); + } + + function run(string memory encodedTokenSymbols) external { + _run(vm.parseBytes(encodedTokenSymbols), address(0)); + } + + function run(string memory encodedTokenSymbols, address signerOverride) external { + _run(vm.parseBytes(encodedTokenSymbols), signerOverride); + } + + function _run(bytes memory encodedTokenSymbols, address signerOverride) internal { + string[] memory tokenSymbols = abi.decode(encodedTokenSymbols, (string[])); + require(tokenSymbols.length != 0, "token symbols required"); + + string memory deployerMnemonic = vm.envString("MNEMONIC"); + uint256 deployerPrivateKey = vm.deriveKey(deployerMnemonic, 0); + address deployer = vm.addr(deployerPrivateKey); + address signer = signerOverride == address(0) ? deployer : signerOverride; + uint256 chainId = block.chainid; + address spokePool = getAddress(chainId, SPOKE_POOL_NAME); + require(spokePool != address(0), "SpokePool missing in broadcast/deployed-addresses.json"); + + ReadHCoreTokenInfoUtil reader = new ReadHCoreTokenInfoUtil(); + TokenConfig[] memory tokenConfigs = new TokenConfig[](tokenSymbols.length); + for (uint256 i = 0; i < tokenSymbols.length; i++) { + string memory tokenSymbol = tokenSymbols[i]; + require(bytes(tokenSymbol).length != 0, "empty token symbol"); + ReadHCoreTokenInfoUtil.TokenJson memory info = reader.readToken(tokenSymbol); + tokenConfigs[i] = TokenConfig({ + symbol: tokenSymbol, + evmAddress: reader.resolveEvmAddress(info), + coreIndex: info.index.toUint32(), + canBeUsedForAccountActivation: info.canBeUsedForAccountActivation, + accountActivationFeeCore: info.accountActivationFeeCore.toUint64(), + bridgeSafetyBufferCore: info.bridgeSafetyBufferCore.toUint64() + }); + } - // Activate Handler account so it can write to CoreWriter by sending 1 core wei. - HyperCoreLib.transferERC20CoreToCore( - usdhTokenIndex, - address(hyperliquidDepositHandler), - 1, - HyperCoreLib.CORE_SPOT_DEX_ID, - HyperCoreLib.CORE_SPOT_DEX_ID - ); - hyperliquidDepositHandler.addSupportedToken( - address(usdh), - usdhTokenIndex, - true, // canBeUsedForAccountActivation - usdhActivationFeeCore, - usdhBridgeSafetyBufferCore - ); - - // Log the deployed addresses console.log("Chain ID:", chainId); - console.log("HyperliquidDepositHandler deployed to:", address(hyperliquidDepositHandler)); + console.log("SpokePool:", spokePool); + console.log("Deployer:", deployer); console.log("Signer required to sign payloads for handleV3AcrossMessage:", signer); - console.log("USDH token index:", usdhTokenIndex); - console.log("USDH activation fee (core):", usdhActivationFeeCore); + vm.startBroadcast(deployerPrivateKey); + HyperliquidDepositHandler hyperliquidDepositHandler = new HyperliquidDepositHandler(signer, spokePool); vm.stopBroadcast(); + + address deployedHandler = address(hyperliquidDepositHandler); + console.log("HyperliquidDepositHandler deployed to:", deployedHandler); + console.log("Configured token count:", tokenConfigs.length); + _printPostDeploySteps(deployedHandler, tokenConfigs); + } + + function _printPostDeploySteps(address deployedHandler, TokenConfig[] memory tokenConfigs) internal pure { + console.log("POST-DEPLOY STEPS (manual):"); + console.log("Foundry scripts cannot currently execute HyperCore precompile-dependent setup flows."); + console.log("TODO: when precompile simulation support is available, inline these setup calls in this script."); + console.log("1) Activate HyperCore account for the deployed handler."); + console.log(" Handler:", deployedHandler); + console.log(" Use Hyperliquid UI/API to send 1 core wei to this address."); + console.log(" Suggested activation token:", tokenConfigs[0].symbol); + + for (uint256 i = 0; i < tokenConfigs.length; i++) { + TokenConfig memory cfg = tokenConfigs[i]; + uint256 stepNum = i + 2; + string memory canActivate = cfg.canBeUsedForAccountActivation ? "true" : "false"; + + console.log( + string(abi.encodePacked(vm.toString(stepNum), ") Configure ", cfg.symbol, " via addSupportedToken")) + ); + console.log(" Function:", ADD_SUPPORTED_TOKEN_SIG); + console.log(" token:", cfg.evmAddress); + console.log(" coreIndex:", uint256(cfg.coreIndex)); + console.log(" canBeUsedForAccountActivation:", cfg.canBeUsedForAccountActivation); + console.log(" accountActivationFeeCore:", uint256(cfg.accountActivationFeeCore)); + console.log(" bridgeSafetyBufferCore:", uint256(cfg.bridgeSafetyBufferCore)); + console.log(" Command:"); + console.log( + string( + abi.encodePacked( + " cast send ", + vm.toString(deployedHandler), + ' "', + ADD_SUPPORTED_TOKEN_SIG, + '" ', + vm.toString(cfg.evmAddress), + " ", + vm.toString(cfg.coreIndex), + " ", + canActivate, + " ", + vm.toString(cfg.accountActivationFeeCore), + " ", + vm.toString(cfg.bridgeSafetyBufferCore), + " --rpc-url hyperevm --account " + ) + ) + ); + } } } diff --git a/script/mintburn/README.md b/script/mintburn/README.md new file mode 100644 index 000000000..0738ba505 --- /dev/null +++ b/script/mintburn/README.md @@ -0,0 +1,26 @@ +## Hypercore token metadata notes + +- To get `hypercore-tokens.json` info: + +``` +curl -s 'https://api.hyperliquid.xyz/info' \ + -H 'content-type: application/json' \ + --data '{"type":"spotMeta"}' \ +| jq '.tokens[] + | select((.name|ascii_upcase)=="USDT0" + or (.name|ascii_upcase)=="USDC" + or (.name|ascii_upcase)=="USDH")' +``` + +These 3 fields added manually to each entry: + +``` + "canBeUsedForAccountActivation": true, + "accountActivationFeeCore": 100000000, + "bridgeSafetyBufferCore": 100000000000000000 +``` + +- `script/mintburn/hypercore-tokens.json` is read by `script/mintburn/ReadHCoreTokenInfoUtil.s.sol`. +- USDC is a special case: `evmContract.address` in that JSON is **not** the real HyperEVM USDC ERC20 address. +- Read utils hard-override USDC to `0xb88339CB7199b77E23DB6E890353E22632Ba630f` for all script configuration paths. +- Same address is documented in `script/mintburn/oft/README.md`. diff --git a/script/mintburn/ReadHCoreTokenInfoUtil.s.sol b/script/mintburn/ReadHCoreTokenInfoUtil.s.sol index 6c480bf2f..d6c83eac6 100644 --- a/script/mintburn/ReadHCoreTokenInfoUtil.s.sol +++ b/script/mintburn/ReadHCoreTokenInfoUtil.s.sol @@ -2,11 +2,10 @@ pragma solidity ^0.8.0; import { Script } from "forge-std/Script.sol"; -import { console } from "forge-std/console.sol"; -import { Constants } from "../utils/Constants.sol"; contract ReadHCoreTokenInfoUtil is Script { string internal constant HCORE_JSON_PATH = "./script/mintburn/hypercore-tokens.json"; + address internal constant HYPEREVM_USDC = 0xb88339CB7199b77E23DB6E890353E22632Ba630f; struct TokenJson { uint256 index; @@ -14,31 +13,37 @@ contract ReadHCoreTokenInfoUtil is Script { bool canBeUsedForAccountActivation; uint256 accountActivationFeeCore; uint256 bridgeSafetyBufferCore; + bool isUsdc; } - function readToken(string memory tokenName) public view returns (TokenJson memory info) { + function readToken(string memory tokenKey) public view returns (TokenJson memory info) { string memory json = vm.readFile(HCORE_JSON_PATH); - string memory base = string.concat(".", tokenName); + string memory base = string.concat(".", tokenKey); info.index = vm.parseJsonUint(json, string.concat(base, ".index")); + info.isUsdc = _isUsdc(tokenKey); - // evmAddress can be null in JSON; parseJsonAddress would revert. Try/catch and leave zero if unset. - try this._parseAddress(json, string.concat(base, ".evmAddress")) returns (address a) { + // evmContract.address can be null in JSON; parseJsonAddress would revert. + try this._parseAddress(json, string.concat(base, ".evmContract.address")) returns (address a) { info.evmAddress = a; } catch { info.evmAddress = address(0); } - // Required fields for CoreTokenInfo - info.canBeUsedForAccountActivation = vm.parseJsonBool( - json, - string.concat(base, ".canBeUsedForAccountActivation") - ); - info.accountActivationFeeCore = vm.parseJsonUint(json, string.concat(base, ".accountActivationFeeCore")); - info.bridgeSafetyBufferCore = vm.parseJsonUint(json, string.concat(base, ".bridgeSafetyBufferCore")); + // Optional fields for CoreTokenInfo. Leave defaults if absent. + try this._parseBool(json, string.concat(base, ".canBeUsedForAccountActivation")) returns (bool canActivate) { + info.canBeUsedForAccountActivation = canActivate; + } catch {} + try this._parseUint(json, string.concat(base, ".accountActivationFeeCore")) returns (uint256 activationFee) { + info.accountActivationFeeCore = activationFee; + } catch {} + try this._parseUint(json, string.concat(base, ".bridgeSafetyBufferCore")) returns (uint256 bridgeSafetyBuffer) { + info.bridgeSafetyBufferCore = bridgeSafetyBuffer; + } catch {} } - function resolveEvmAddress(TokenJson memory info, uint256 /* chainId */) public pure returns (address evm) { + function resolveEvmAddress(TokenJson memory info) public pure returns (address evm) { + if (info.isUsdc) return HYPEREVM_USDC; require(info.evmAddress != address(0), "evmAddress required in JSON"); return info.evmAddress; } @@ -47,4 +52,16 @@ contract ReadHCoreTokenInfoUtil is Script { function _parseAddress(string memory json, string memory key) external pure returns (address) { return vm.parseJsonAddress(json, key); } + + function _parseBool(string memory json, string memory key) external pure returns (bool) { + return vm.parseJsonBool(json, key); + } + + function _parseUint(string memory json, string memory key) external pure returns (uint256) { + return vm.parseJsonUint(json, key); + } + + function _isUsdc(string memory tokenKey) internal pure returns (bool) { + return keccak256(bytes(tokenKey)) == keccak256(bytes("usdc")); + } } diff --git a/script/mintburn/hypercore-tokens.json b/script/mintburn/hypercore-tokens.json index 5832fc3d9..183161d19 100644 --- a/script/mintburn/hypercore-tokens.json +++ b/script/mintburn/hypercore-tokens.json @@ -1,36 +1,51 @@ { "usdc": { "name": "USDC", - "index": 0, - "tokenId": "0x6d1e7cde53ba9467b783cb7c530ce054", "szDecimals": 8, "weiDecimals": 8, + "index": 0, + "tokenId": "0x6d1e7cde53ba9467b783cb7c530ce054", "isCanonical": true, - "evmAddress": null, + "evmContract": { + "address": "0x6b9e773128f453f5c2c60935ee2de2cbc5390a24", + "evm_extra_wei_decimals": -2 + }, + "fullName": null, + "deployerTradingFeeShare": "0.0", "canBeUsedForAccountActivation": true, "accountActivationFeeCore": 100000000, "bridgeSafetyBufferCore": 100000000000000000 }, "usdt0": { "name": "USDT0", - "index": 268, - "tokenId": "0x25faedc3f054130dbb4e4203aca63567", "szDecimals": 2, "weiDecimals": 8, + "index": 268, + "tokenId": "0x25faedc3f054130dbb4e4203aca63567", "isCanonical": false, - "evmAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb", + "evmContract": { + "address": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb", + "evm_extra_wei_decimals": -2 + }, + "fullName": "USDT0", + "deployerTradingFeeShare": "0.0", "canBeUsedForAccountActivation": true, "accountActivationFeeCore": 100000000, "bridgeSafetyBufferCore": 100000000000000000 }, "usdh": { "name": "USDH", - "index": 360, - "tokenId": "0x54e00a5988577cb0b0c9ab0cb6ef7f4b", "szDecimals": 2, "weiDecimals": 8, + "index": 360, + "tokenId": "0x54e00a5988577cb0b0c9ab0cb6ef7f4b", "isCanonical": false, - "evmAddress": "0x111111a1a0667d36bd57c0a9f569b98057111111", + "evmContract": { + "address": "0x111111a1a0667d36bd57c0a9f569b98057111111", + "evm_extra_wei_decimals": -2 + }, + "fullName": "USDH", + "deployerTradingFeeShare": "0.0", "canBeUsedForAccountActivation": true, "accountActivationFeeCore": 100000000, "bridgeSafetyBufferCore": 100000000000000000 diff --git a/script/mintburn/oft/DstHandlerConfigLib.s.sol b/script/mintburn/oft/DstHandlerConfigLib.s.sol index 932d6fdf4..437086e67 100644 --- a/script/mintburn/oft/DstHandlerConfigLib.s.sol +++ b/script/mintburn/oft/DstHandlerConfigLib.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import { Config } from "forge-std/Config.sol"; import { console } from "forge-std/console.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; +import { SafeCast } from "@openzeppelin/contracts-v4/utils/math/SafeCast.sol"; import { ReadHCoreTokenInfoUtil } from "../../mintburn/ReadHCoreTokenInfoUtil.s.sol"; import { DstOFTHandler } from "../../../contracts/periphery/mintburn/sponsored-oft/DstOFTHandler.sol"; @@ -14,6 +14,7 @@ import { AddressToBytes32 } from "../../../contracts/libraries/AddressConverters /// @notice Shared helper for configuring `DstOFTHandler` instances using TOML and JSON metadata. abstract contract DstHandlerConfigLib is Config { using AddressToBytes32 for address; + using SafeCast for uint256; function _loadTokenConfig(string memory tokenKey) internal { require(bytes(tokenKey).length != 0, "token key required"); @@ -26,7 +27,7 @@ abstract contract DstHandlerConfigLib is Config { ReadHCoreTokenInfoUtil reader = new ReadHCoreTokenInfoUtil(); ReadHCoreTokenInfoUtil.TokenJson memory info = reader.readToken(tokenName); - address tokenAddr = reader.resolveEvmAddress(info, block.chainid); + address tokenAddr = reader.resolveEvmAddress(info); require(tokenAddr != address(0), "token addr missing"); console.log("Configuring CoreTokenInfo for", tokenName); @@ -35,10 +36,10 @@ abstract contract DstHandlerConfigLib is Config { HyperCoreFlowExecutor(dstHandlerAddress).setCoreTokenInfo( tokenAddr, - uint32(info.index), + info.index.toUint32(), info.canBeUsedForAccountActivation, - uint64(info.accountActivationFeeCore), - uint64(info.bridgeSafetyBufferCore) + info.accountActivationFeeCore.toUint64(), + info.bridgeSafetyBufferCore.toUint64() ); } From 044050dc4dc2f939b9a0c7c1e2865d54e7006abb Mon Sep 17 00:00:00 2001 From: Ihor Farion Date: Thu, 12 Feb 2026 20:50:43 -0800 Subject: [PATCH 2/2] add --verify Signed-off-by: Ihor Farion --- script/DeployHyperliquidDepositHandler.s.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/DeployHyperliquidDepositHandler.s.sol b/script/DeployHyperliquidDepositHandler.s.sol index 4c898c9fb..f1716db76 100644 --- a/script/DeployHyperliquidDepositHandler.s.sol +++ b/script/DeployHyperliquidDepositHandler.s.sol @@ -16,12 +16,12 @@ TOKENS_ENCODED=$(cast abi-encode "f(string[])" "$TOKENS_JSON") # signer defaults to deployer forge script script/DeployHyperliquidDepositHandler.s.sol:DeployHyperliquidDepositHandler \ - --sig "run(string)" "$TOKENS_ENCODED" --rpc-url hyperevm -vvvv --broadcast + --sig "run(string)" "$TOKENS_ENCODED" --rpc-url hyperevm -vvvv --broadcast --verify # explicit signer override (pass zero address to use deployer) SIGNER=0x1111111111111111111111111111111111111111 forge script script/DeployHyperliquidDepositHandler.s.sol:DeployHyperliquidDepositHandler \ - --sig "run(string,address)" "$TOKENS_ENCODED" $SIGNER --rpc-url hyperevm -vvvv --broadcast + --sig "run(string,address)" "$TOKENS_ENCODED" $SIGNER --rpc-url hyperevm -vvvv --broadcast --verify */ contract DeployHyperliquidDepositHandler is Script, DeployedAddresses {