From 872bb84af443d4042164621574e81d66d0b1b6ce Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:25:57 -0500 Subject: [PATCH 1/7] update EVM.BridgeRouter, add BridgeAccessorUpdated event & refactor implementations --- .../bridge/FlowEVMBridgeAccessor.cdc | 14 ++++------ cadence/contracts/standards/EVM.cdc | 28 +++++++++++++++++++ cadence/tests/test_helpers.cdc | 2 +- ...im_accessor_capability_and_save_router.cdc | 12 ++++---- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/cadence/contracts/bridge/FlowEVMBridgeAccessor.cdc b/cadence/contracts/bridge/FlowEVMBridgeAccessor.cdc index f8f4d734..2db55957 100644 --- a/cadence/contracts/bridge/FlowEVMBridgeAccessor.cdc +++ b/cadence/contracts/bridge/FlowEVMBridgeAccessor.cdc @@ -160,21 +160,17 @@ contract FlowEVMBridgeAccessor { self.bridgeAccessorCap = nil } - /// Sets the BridgeAccessor capability on the BridgeRouter - /// - access(EVM.Bridge) fun setBridgeAccessorCap(_ cap: Capability) { - pre { - cap.check(): "BridgeAccessor capability already set" - } - self.bridgeAccessorCap = cap - } - /// Returns an EVM.Bridge entitled reference to the underlying BridgeAccessor resource /// access(EVM.Bridge) view fun borrowBridgeAccessor(): auth(EVM.Bridge) &{EVM.BridgeAccessor} { let cap = self.bridgeAccessorCap ?? panic("BridgeAccessor Capabaility is not yet set") return cap.borrow() ?? panic("Problem retrieving BridgeAccessor reference") } + + /// Sets the BridgeAccessor Capability in the BridgeRouter + access(EVM.Bridge) fun setBridgeAccessor(_ accessorCap: Capability) { + self.bridgeAccessorCap = accessorCap + } } init(publishToEVMAccount: Address) { diff --git a/cadence/contracts/standards/EVM.cdc b/cadence/contracts/standards/EVM.cdc index 12ee784d..ffdd4922 100644 --- a/cadence/contracts/standards/EVM.cdc +++ b/cadence/contracts/standards/EVM.cdc @@ -29,6 +29,19 @@ contract EVM { access(all) event FLOWTokensWithdrawn(addressBytes: [UInt8; 20], amount: UFix64) + /// BridgeAccessorUpdated is emitted when the BridgeAccessor Capability + /// is updated in the stored BridgeRouter along with identifying + /// information about both. + access(all) + event BridgeAccessorUpdated( + routerType: Type, + routerUUID: UInt64, + routerAddress: Address, + accessorType: Type, + accessorUUID: UInt64, + accessorAddress: Address + ) + /// EVMAddress is an EVM-compatible address access(all) struct EVMAddress { @@ -602,6 +615,21 @@ contract EVM { /// Returns a reference to the BridgeAccessor designated for internal bridge requests access(Bridge) view fun borrowBridgeAccessor(): auth(Bridge) &{BridgeAccessor} + + /// Sets the BridgeAccessor Capability in the BridgeRouter + access(Bridge) fun setBridgeAccessor(_ accessor: Capability) { + pre { + accessor.check(): "Invalid BridgeAccessor Capability provided" + emit BridgeAccessorUpdated( + routerType: self.getType(), + routerUUID: self.uuid, + routerAddress: self.owner?.address ?? panic("Router must have an owner to be identified"), + accessorType: accessor.borrow().getType(), + accessorUUID: accessor.borrow()!.uuid, + accessorAddress: accessor.address + ) + } + } } /// Returns a reference to the BridgeAccessor designated for internal bridge requests diff --git a/cadence/tests/test_helpers.cdc b/cadence/tests/test_helpers.cdc index 3614d7e2..8824aea4 100644 --- a/cadence/tests/test_helpers.cdc +++ b/cadence/tests/test_helpers.cdc @@ -2,7 +2,7 @@ /// See the python util `get_code_hex.py` to retrieve the hex-encoded Cadence either with or /// without a separator (`{{CONTRACT_NAME}}` used in templates to "chunk" template code). -access(all) let evmUpdateCode = "696d706f72742043727970746f0a696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030310a696d706f72742046756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030320a696d706f727420466c6f77546f6b656e2066726f6d203078303030303030303030303030303030330a0a61636365737328616c6c290a636f6e74726163742045564d207b0a0a202020202f2f20456e7469746c656d656e747320656e61626c696e672066696e65722d6772616e65642061636365737320636f6e74726f6c206f6e206120436164656e63654f776e65644163636f756e740a2020202061636365737328616c6c2920656e7469746c656d656e742056616c69646174650a2020202061636365737328616c6c2920656e7469746c656d656e742057697468647261770a2020202061636365737328616c6c2920656e7469746c656d656e742043616c6c0a2020202061636365737328616c6c2920656e7469746c656d656e74204465706c6f790a2020202061636365737328616c6c2920656e7469746c656d656e74204f776e65720a2020202061636365737328616c6c2920656e7469746c656d656e74204272696467650a0a2020202061636365737328616c6c290a202020206576656e7420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a205b55496e74383b2032305d290a0a202020202f2f2f20464c4f57546f6b656e734465706f736974656420697320656d6974746564207768656e20464c4f5720746f6b656e7320697320627269646765640a202020202f2f2f20696e746f207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f20464c4f57546f6b656e7357697468647261776e20697320656d6974746564207768656e20464c4f5720746f6b656e732061726520627269646765640a202020202f2f2f206f7574206f66207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f2045564d4164647265737320697320616e2045564d2d636f6d70617469626c6520616464726573730a2020202061636365737328616c6c290a202020207374727563742045564d41646472657373207b0a0a20202020202020202f2f2f204279746573206f662074686520616464726573730a202020202020202061636365737328616c6c290a20202020202020206c65742062797465733a205b55496e74383b2032305d0a0a20202020202020202f2f2f20436f6e737472756374732061206e65772045564d20616464726573732066726f6d2074686520676976656e206279746520726570726573656e746174696f6e0a20202020202020207669657720696e69742862797465733a205b55496e74383b2032305d29207b0a20202020202020202020202073656c662e6279746573203d2062797465730a20202020202020207d0a0a20202020202020202f2f2f2042616c616e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a2020202020202020202020206c65742062616c616e6365203d20496e7465726e616c45564d2e62616c616e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020202020202072657475726e2042616c616e6365286174746f666c6f773a2062616c616e6365290a20202020202020207d0a0a20202020202020202f2f2f204e6f6e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206e6f6e636528293a2055496e743634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e6e6f6e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f6465206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f646528293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f6465280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f646548617368206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f64654861736828293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f646548617368280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f207468652045564d206163636f756e7420776974682074686520676976656e20616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a2020202020202020202020206c657420616d6f756e74203d2066726f6d2e62616c616e63650a202020202020202020202020696620616d6f756e74203d3d20302e30207b0a2020202020202020202020202020202070616e6963282263616c6c696e67206465706f7369742066756e6374696f6e207769746820616e20656d707479207661756c74206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a202020202020202020202020496e7465726e616c45564d2e6465706f736974280a2020202020202020202020202020202066726f6d3a203c2d66726f6d2c0a20202020202020202020202020202020746f3a2073656c662e62797465730a202020202020202020202020290a202020202020202020202020656d697420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a2073656c662e62797465732c20616d6f756e743a20616d6f756e74290a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207374727563742042616c616e6365207b0a0a20202020202020202f2f2f205468652062616c616e636520696e206174746f2d464c4f570a20202020202020202f2f2f204174746f2d464c4f572069732074686520736d616c6c6573742064656e6f6d696e6174696f6e206f6620464c4f5720283165313820464c4f57290a20202020202020202f2f2f2074686174206973207573656420746f2073746f7265206163636f756e742062616c616e63657320696e736964652045564d0a20202020202020202f2f2f2073696d696c617220746f207468652077617920574549206973207573656420746f2073746f72652045544820646976697369626c6520746f20313820646563696d616c20706c616365732e0a202020202020202061636365737328616c6c290a2020202020202020766172206174746f666c6f773a2055496e740a0a20202020202020202f2f2f20436f6e737472756374732061206e65772062616c616e63650a202020202020202061636365737328616c6c290a20202020202020207669657720696e6974286174746f666c6f773a2055496e7429207b0a20202020202020202020202073656c662e6174746f666c6f77203d206174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2053657473207468652062616c616e636520627920612055466978363420283820646563696d616c20706f696e7473292c2074686520666f726d61740a20202020202020202f2f2f2074686174206973207573656420696e20436164656e636520746f2073746f726520464c4f5720746f6b656e732e0a202020202020202061636365737328616c6c290a202020202020202066756e20736574464c4f5728666c6f773a20554669783634297b0a20202020202020202020202073656c662e6174746f666c6f77203d20496e7465726e616c45564d2e63617374546f4174746f464c4f572862616c616e63653a20666c6f77290a20202020202020207d0a0a20202020202020202f2f2f204361737473207468652062616c616e636520746f2061205546697836342028726f756e64696e6720646f776e290a20202020202020202f2f2f205761726e696e67212063617374696e6720612062616c616e636520746f20612055466978363420776869636820737570706f7274732061206c6f776572206c6576656c206f6620707265636973696f6e0a20202020202020202f2f2f20283820646563696d616c20706f696e747320696e20636f6d7061726520746f20313829206d6967687420726573756c7420696e20726f756e64696e6720646f776e206572726f722e0a20202020202020202f2f2f205573652074686520746f4174746f466c6f772066756e6374696f6e20696620796f752063617265206e656564206d6f72652061636375726163792e0a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e464c4f5728293a20554669783634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63617374546f464c4f572862616c616e63653a2073656c662e6174746f666c6f77290a20202020202020207d0a0a20202020202020202f2f2f2052657475726e73207468652062616c616e636520696e204174746f2d464c4f570a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e4174746f464c4f5728293a2055496e74207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074727565206966207468652062616c616e6365206973207a65726f0a202020202020202061636365737328616c6c290a202020202020202066756e2069735a65726f28293a20426f6f6c207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f77203d3d20300a20202020202020207d0a202020207d0a0a202020202f2f2f207265706f7274732074686520737461747573206f662065766d20657865637574696f6e2e0a2020202061636365737328616c6c2920656e756d205374617475733a2055496e7438207b0a20202020202020202f2f2f2069732028726172656c79292072657475726e6564207768656e2073746174757320697320756e6b6e6f776e0a20202020202020202f2f2f20616e6420736f6d657468696e672068617320676f6e6520766572792077726f6e672e0a202020202020202061636365737328616c6c29206361736520756e6b6e6f776e0a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206661696c6564206174207468652076616c69646174696f6e20737465702028652e672e206e6f6e6365206d69736d61746368292e0a20202020202020202f2f2f20416e20696e76616c6964207472616e73616374696f6e2f63616c6c2069732072656a656374656420746f2062652065786563757465640a20202020202020202f2f2f206f7220626520696e636c7564656420696e206120626c6f636b2e0a202020202020202061636365737328616c6c29206361736520696e76616c69640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c206275742074686520766d20686173207265706f7274656420616e206572726f722061730a20202020202020202f2f2f20746865206f7574636f6d65206f6620657865637574696f6e2028652e672e2072756e6e696e67206f7574206f6620676173292e0a20202020202020202f2f2f2041206661696c65642074782f63616c6c20697320696e636c7564656420696e206120626c6f636b2e0a20202020202020202f2f2f204e6f746520746861742072657375626d697373696f6e206f662061206661696c6564207472616e73616374696f6e20776f756c640a20202020202020202f2f2f20726573756c7420696e20696e76616c69642073746174757320696e20746865207365636f6e6420617474656d70742c20676976656e0a20202020202020202f2f2f20746865206e6f6e636520776f756c6420626520636f6d6520696e76616c69642e0a202020202020202061636365737328616c6c292063617365206661696c65640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c20616e64206e6f206572726f72206973207265706f727465642062792074686520766d2e0a202020202020202061636365737328616c6c292063617365207375636365737366756c0a202020207d0a0a202020202f2f2f207265706f72747320746865206f7574636f6d65206f662065766d207472616e73616374696f6e2f63616c6c20657865637574696f6e20617474656d70740a2020202061636365737328616c6c292073747275637420526573756c74207b0a20202020202020202f2f2f20737461747573206f662074686520657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c6574207374617475733a205374617475730a0a20202020202020202f2f2f206572726f7220636f646520286572726f7220636f6465207a65726f206d65616e73206e6f206572726f72290a202020202020202061636365737328616c6c290a20202020202020206c6574206572726f72436f64653a2055496e7436340a0a20202020202020202f2f2f2072657475726e732074686520616d6f756e74206f6620676173206d65746572656420647572696e670a20202020202020202f2f2f2065766d20657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c657420676173557365643a2055496e7436340a0a20202020202020202f2f2f2072657475726e7320746865206461746120746861742069732072657475726e65642066726f6d0a20202020202020202f2f2f207468652065766d20666f72207468652063616c6c2e20466f7220636f612e6465706c6f790a20202020202020202f2f2f2063616c6c732069742072657475726e73207468652061646472657373206279746573206f66207468650a20202020202020202f2f2f206e65776c79206465706c6f79656420636f6e74726163742e0a202020202020202061636365737328616c6c290a20202020202020206c657420646174613a205b55496e74385d0a0a2020202020202020696e6974280a2020202020202020202020207374617475733a205374617475732c0a2020202020202020202020206572726f72436f64653a2055496e7436342c0a202020202020202020202020676173557365643a2055496e7436342c0a202020202020202020202020646174613a205b55496e74385d0a202020202020202029207b0a20202020202020202020202073656c662e737461747573203d207374617475730a20202020202020202020202073656c662e6572726f72436f6465203d206572726f72436f64650a20202020202020202020202073656c662e67617355736564203d20676173557365640a20202020202020202020202073656c662e64617461203d20646174610a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204164647265737361626c65207b0a20202020202020202f2f2f205468652045564d20616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d416464726573730a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520436164656e63654f776e65644163636f756e743a204164647265737361626c65207b0a0a20202020202020206163636573732873656c66290a2020202020202020766172206164647265737342797465733a205b55496e74383b2032305d0a0a2020202020202020696e69742829207b0a2020202020202020202020202f2f206164647265737320697320696e697469616c6c792073657420746f207a65726f0a2020202020202020202020202f2f206275742075706461746564207468726f75676820696e697441646472657373206c617465720a2020202020202020202020202f2f207765206861766520746f20646f20746869732073696e6365207765206e656564207265736f75726365206964202875756964290a2020202020202020202020202f2f20746f2063616c63756c617465207468652045564d206164647265737320666f72207468697320636164656e6365206f776e6564206163636f756e740a20202020202020202020202073656c662e616464726573734279746573203d205b302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20305d0a20202020202020207d0a0a202020202020202061636365737328636f6e7472616374290a202020202020202066756e20696e697441646472657373286164647265737342797465733a205b55496e74383b2032305d29207b0a20202020202020202020202f2f206f6e6c7920616c6c6f7720736574206164647265737320666f72207468652066697273742074696d650a20202020202020202020202f2f20636865636b206164647265737320697320656d7074790a202020202020202020202020666f72206974656d20696e2073656c662e616464726573734279746573207b0a20202020202020202020202020202020617373657274286974656d203d3d20302c206d6573736167653a2022616464726573732062797465206973206e6f7420656d70747922290a2020202020202020202020207d0a202020202020202020202073656c662e616464726573734279746573203d206164647265737342797465730a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d41646472657373207b0a2020202020202020202020202f2f20416c77617973206372656174652061206e65772045564d4164647265737320696e7374616e63650a20202020202020202020202072657475726e2045564d416464726573732862797465733a2073656c662e616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f204765742062616c616e6365206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a20202020202020202020202072657475726e2073656c662e6164647265737328292e62616c616e636528290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a20202020202020202020202073656c662e6164647265737328292e6465706f7369742866726f6d3a203c2d66726f6d290a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e7420626568696e6420616e20656e7469746c656d656e742c20616374696e672061732070726f6f66206f66206163636573730a2020202020202020616363657373284f776e6572207c2056616c6964617465290a2020202020202020766965772066756e2070726f7465637465644164647265737328293a2045564d41646472657373207b0a20202020202020202020202072657475726e2073656c662e6164647265737328290a20202020202020207d0a0a20202020202020202f2f2f20576974686472617773207468652062616c616e63652066726f6d2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a20202020202020202f2f2f204e6f7465207468617420616d6f756e747320736d616c6c6572207468616e2031306e4620283130652d38292063616e27742062652077697468647261776e0a20202020202020202f2f2f20676976656e207468617420466c6f7720546f6b656e205661756c747320757365205546697836347320746f2073746f72652062616c616e6365732e0a20202020202020202f2f2f2049662074686520676976656e2062616c616e636520636f6e76657273696f6e20746f2055466978363420726573756c747320696e0a20202020202020202f2f2f20726f756e64696e67206572726f722c20746869732066756e6374696f6e20776f756c64206661696c2e0a2020202020202020616363657373284f776e6572207c205769746864726177290a202020202020202066756e2077697468647261772862616c616e63653a2042616c616e6365293a2040466c6f77546f6b656e2e5661756c74207b0a20202020202020202020202069662062616c616e63652e69735a65726f2829207b0a2020202020202020202020202020202070616e6963282263616c6c696e672077697468647261772066756e6374696f6e2077697468207a65726f2062616c616e6365206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a2020202020202020202020206c6574207661756c74203c2d20496e7465726e616c45564d2e7769746864726177280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020616d6f756e743a2062616c616e63652e6174746f666c6f770a20202020202020202020202029206173212040466c6f77546f6b656e2e5661756c740a202020202020202020202020656d697420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a2073656c662e6164647265737342797465732c20616d6f756e743a2062616c616e63652e696e464c4f572829290a20202020202020202020202072657475726e203c2d7661756c740a20202020202020207d0a0a20202020202020202f2f2f204465706c6f7973206120636f6e747261637420746f207468652045564d20656e7669726f6e6d656e742e0a20202020202020202f2f2f2052657475726e73207468652061646472657373206f6620746865206e65776c79206465706c6f79656420636f6e74726163740a2020202020202020616363657373284f776e6572207c204465706c6f79290a202020202020202066756e206465706c6f79280a202020202020202020202020636f64653a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a2045564d41646472657373207b0a2020202020202020202020206c657420616464726573734279746573203d20496e7465726e616c45564d2e6465706c6f79280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020636f64653a20636f64652c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020290a20202020202020202020202072657475726e2045564d416464726573732862797465733a20616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f2043616c6c7320612066756e6374696f6e20776974682074686520676976656e20646174612e0a20202020202020202f2f2f2054686520657865637574696f6e206973206c696d697465642062792074686520676976656e20616d6f756e74206f66206761730a2020202020202020616363657373284f776e6572207c2043616c6c290a202020202020202066756e2063616c6c280a202020202020202020202020746f3a2045564d416464726573732c0a202020202020202020202020646174613a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a20526573756c74207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63616c6c280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020746f3a20746f2e62797465732c0a20202020202020202020202020202020646174613a20646174612c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020292061732120526573756c740a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e465420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f7369744e4654286e66743a203c2d6e66742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e46542066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e2074686520726571756573746564204e465420696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e2077697468647261774e4654280a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e77697468647261774e4654280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a2020202020202020202020202020202069643a2069642c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e205661756c7420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f736974546f6b656e73287661756c743a203c2d7661756c742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e2066756e6769626c6520746f6b656e732066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720610a20202020202020202f2f2f2066656520746f2066756c66696c6c207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e207468652072657175657374656420746f6b656e7320262073756666696369656e742062616c616e6365206f660a20202020202020202f2f2f2072657175657374656420746f6b656e7320696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e207769746864726177546f6b656e73280a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e7769746864726177546f6b656e73280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a20202020202020202020202020202020616d6f756e743a20616d6f756e742c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a202020207d0a0a202020202f2f2f20437265617465732061206e657720636164656e6365206f776e6564206163636f756e740a2020202061636365737328616c6c290a2020202066756e20637265617465436164656e63654f776e65644163636f756e7428293a2040436164656e63654f776e65644163636f756e74207b0a20202020202020206c657420616363203c2d63726561746520436164656e63654f776e65644163636f756e7428290a20202020202020206c65742061646472203d20496e7465726e616c45564d2e637265617465436164656e63654f776e65644163636f756e7428757569643a206163632e75756964290a20202020202020206163632e696e697441646472657373286164647265737342797465733a2061646472290a2020202020202020656d697420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a2061646472290a202020202020202072657475726e203c2d6163630a202020207d0a0a202020202f2f2f2052756e7320616e206120524c502d656e636f6465642045564d207472616e73616374696f6e2c2064656475637473207468652067617320666565732c0a202020202f2f2f20616e64206465706f736974732074686520676173206665657320696e746f207468652070726f766964656420636f696e6261736520616464726573732e0a2020202061636365737328616c6c290a2020202066756e2072756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a202020202020202072657475726e20496e7465726e616c45564d2e72756e280a2020202020202020202020202020202074783a2074782c0a20202020202020202020202020202020636f696e626173653a20636f696e626173652e62797465730a2020202020202020292061732120526573756c740a202020207d0a0a202020202f2f2f206d75737452756e2072756e7320746865207472616e73616374696f6e207573696e672045564d2e72756e207965742069740a202020202f2f2f20726f6c6c6261636b2069662074686520747820657865637574696f6e2073746174757320697320756e6b6e6f776e206f7220696e76616c69642e0a202020202f2f2f204e6f746520746861742074686973206d6574686f6420646f6573206e6f7420726f6c6c6261636b206966207472616e73616374696f6e0a202020202f2f2f2069732065786563757465642062757420616e20766d206572726f72206973207265706f7274656420617320746865206f7574636f6d650a202020202f2f2f206f662074686520657865637574696f6e20287374617475733a206661696c6564292e0a2020202061636365737328616c6c290a2020202066756e206d75737452756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a20202020202020206c65742072756e526573756c74203d2073656c662e72756e2874783a2074782c20636f696e626173653a20636f696e62617365290a2020202020202020617373657274280a20202020202020202020202072756e526573756c742e737461747573203d3d205374617475732e6661696c6564207c7c2072756e526573756c742e737461747573203d3d205374617475732e7375636365737366756c2c0a2020202020202020202020206d6573736167653a20227478206973206e6f742076616c696420666f7220657865637574696f6e220a2020202020202020290a202020202020202072657475726e2072756e526573756c740a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249285f2076616c7565733a205b416e795374727563745d293a205b55496e74385d207b0a202020202020202072657475726e20496e7465726e616c45564d2e656e636f64654142492876616c756573290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f64654142492874797065733a205b547970655d2c20646174613a205b55496e74385d293a205b416e795374727563745d207b0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a20202020202020205f2076616c7565733a205b416e795374727563745d0a20202020293a205b55496e74385d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a20202020202020206c657420617267756d656e7473203d20496e7465726e616c45564d2e656e636f64654142492876616c756573290a0a202020202020202072657475726e206d6574686f6449442e636f6e63617428617267756d656e7473290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a202020202020202074797065733a205b547970655d2c0a2020202020202020646174613a205b55496e74385d0a20202020293a205b416e795374727563745d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a0a2020202020202020666f72206279746520696e206d6574686f644944207b0a2020202020202020202020206966206279746520213d20646174612e72656d6f766546697273742829207b0a2020202020202020202020202020202070616e696328227369676e6174757265206d69736d6174636822290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a202020202f2f2f2056616c69646174696f6e526573756c742072657475726e732074686520726573756c74206f6620434f41206f776e6572736869702070726f6f662076616c69646174696f6e0a2020202061636365737328616c6c290a202020207374727563742056616c69646174696f6e526573756c74207b0a202020202020202061636365737328616c6c290a20202020202020206c657420697356616c69643a20426f6f6c0a0a202020202020202061636365737328616c6c290a20202020202020206c65742070726f626c656d3a20537472696e673f0a0a2020202020202020696e697428697356616c69643a20426f6f6c2c2070726f626c656d3a20537472696e673f29207b0a20202020202020202020202073656c662e697356616c6964203d20697356616c69640a20202020202020202020202073656c662e70726f626c656d203d2070726f626c656d0a20202020202020207d0a202020207d0a0a202020202f2f2f2076616c6964617465434f414f776e65727368697050726f6f662076616c696461746573206120434f41206f776e6572736869702070726f6f660a2020202061636365737328616c6c290a2020202066756e2076616c6964617465434f414f776e65727368697050726f6f66280a2020202020202020616464726573733a20416464726573732c0a2020202020202020706174683a205075626c6963506174682c0a20202020202020207369676e6564446174613a205b55496e74385d2c0a20202020202020206b6579496e64696365733a205b55496e7436345d2c0a20202020202020207369676e6174757265733a205b5b55496e74385d5d2c0a202020202020202065766d416464726573733a205b55496e74383b2032305d0a20202020293a2056616c69646174696f6e526573756c74207b0a0a20202020202020202f2f206d616b65207369676e6174757265207365742066697273740a20202020202020202f2f20636865636b206e756d626572206f66207369676e617475726573206d617463686573206e756d626572206f66206b657920696e64696365730a20202020202020206966206b6579496e64696365732e6c656e67746820213d207369676e6174757265732e6c656e677468207b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a20226b657920696e64696365732073697a6520646f65736e2774206d6174636820746865207369676e617475726573220a202020202020202020202020290a20202020202020207d0a0a2020202020202020766172207369676e61747572655365743a205b43727970746f2e4b65794c6973745369676e61747572655d203d205b5d0a2020202020202020666f72207369676e6174757265496e6465782c207369676e617475726520696e207369676e6174757265737b0a2020202020202020202020207369676e61747572655365742e617070656e642843727970746f2e4b65794c6973745369676e6174757265280a202020202020202020202020202020206b6579496e6465783a20496e74286b6579496e64696365735b7369676e6174757265496e6465785d292c0a202020202020202020202020202020207369676e61747572653a207369676e61747572650a20202020202020202020202029290a20202020202020207d0a0a20202020202020202f2f206665746368206163636f756e740a20202020202020206c657420616363203d206765744163636f756e742861646472657373290a0a20202020202020202f2f20636f6e737472756374696e67206b6579206c6973740a20202020202020206c6574206b65794c697374203d2043727970746f2e4b65794c69737428290a2020202020202020666f72207369676e617475726520696e207369676e6174757265536574207b0a2020202020202020202020206c6574206b6579203d206163632e6b6579732e676574286b6579496e6465783a207369676e61747572652e6b6579496e64657829210a20202020202020202020202061737365727428216b65792e69735265766f6b65642c206d6573736167653a20227265766f6b6564206b6579206973207573656422290a2020202020202020202020206b65794c6973742e616464280a20202020202020202020202020206b65792e7075626c69634b65792c0a202020202020202020202020202068617368416c676f726974686d3a206b65792e68617368416c676f726974686d2c0a20202020202020202020202020207765696768743a206b65792e7765696768742c0a2020202020202020202020290a20202020202020207d0a0a20202020202020206c657420697356616c6964203d206b65794c6973742e766572696679280a2020202020202020202020207369676e61747572655365743a207369676e61747572655365742c0a2020202020202020202020207369676e6564446174613a207369676e6564446174612c0a202020202020202020202020646f6d61696e53657061726174696f6e5461673a2022464c4f572d56302e302d75736572220a2020202020202020290a0a202020202020202069662021697356616c69647b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a202274686520676976656e207369676e61747572657320617265206e6f742076616c6964206f722070726f7669646520656e6f75676820776569676874220a202020202020202020202020290a20202020202020207d0a0a20202020202020206c657420636f61526566203d206163632e6361706162696c69746965732e626f72726f773c2645564d2e436164656e63654f776e65644163636f756e743e2870617468290a2020202020202020696620636f61526566203d3d206e696c207b0a2020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202070726f626c656d3a2022636f756c64206e6f7420626f72726f7720627269646765206163636f756e742773207265736f75726365220a20202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f207665726966792065766d2061646472657373206d61746368696e670a20202020202020207661722061646472203d20636f61526566212e6164647265737328290a2020202020202020666f7220696e6465782c206974656d20696e20636f61526566212e6164647265737328292e6279746573207b0a2020202020202020202020206966206974656d20213d2065766d416464726573735b696e6465785d207b0a2020202020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202020202070726f626c656d3a202265766d2061646472657373206d69736d61746368220a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e2056616c69646174696f6e526573756c74280a202020202020202020202020697356616c69643a20747275652c0a20202020202020202020202070726f626c656d3a206e696c0a2020202020202020290a202020207d0a0a202020202f2f2f20426c6f636b2072657475726e7320696e666f726d6174696f6e2061626f757420746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a202020207374727563742045564d426c6f636b207b0a202020202020202061636365737328616c6c290a20202020202020206c6574206865696768743a2055496e7436340a0a202020202020202061636365737328616c6c290a20202020202020206c657420686173683a20537472696e670a0a202020202020202061636365737328616c6c290a20202020202020206c657420746f74616c537570706c793a20496e740a0a2020202020202020696e6974286865696768743a2055496e7436342c20686173683a20537472696e672c20746f74616c537570706c793a20496e7429207b0a20202020202020202020202073656c662e686569676874203d206865696768740a20202020202020202020202073656c662e68617368203d20686173680a20202020202020202020202073656c662e746f74616c537570706c79203d20746f74616c537570706c790a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e7320746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a2020202066756e206765744c6174657374426c6f636b28293a2045564d426c6f636b207b0a202020202020202072657475726e20496e7465726e616c45564d2e6765744c6174657374426c6f636b2829206173212045564d426c6f636b0a202020207d0a0a202020202f2f2f20496e7465726661636520666f722061207265736f75726365207768696368206163747320617320616e20656e747279706f696e7420746f2074686520564d206272696467650a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204272696467654163636573736f72207b0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e465420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e46542066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e2077697468647261774e4654280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620612066756e6769626c6520746f6b656e207661756c7420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f662066756e6769626c6520746f6b656e732066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e207769746864726177546f6b656e73280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d0a202020207d0a0a202020202f2f2f20496e746572666163652077686963682063617074757265732061204361706162696c69747920746f2074686520627269646765204163636573736f722c20736176696e672069742077697468696e2074686520427269646765526f75746572207265736f757263650a2020202061636365737328616c6c290a202020207265736f7572636520696e7465726661636520427269646765526f75746572207b0a0a20202020202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a2020202020202020616363657373284272696467652920766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d0a202020207d0a0a202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a202020206163636573732873656c66290a20202020766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d207b0a202020202020202072657475726e2073656c662e6163636f756e742e73746f726167652e626f72726f773c61757468284272696467652920267b427269646765526f757465727d3e2866726f6d3a202f73746f726167652f65766d427269646765526f75746572290a2020202020202020202020203f2e626f72726f774272696467654163636573736f7228290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f207468652045564d2062726964676522290a202020207d0a7d0a" +access(all) let evmUpdateCode = "696d706f72742043727970746f0a696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030310a696d706f72742046756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030320a696d706f727420466c6f77546f6b656e2066726f6d203078303030303030303030303030303030330a0a61636365737328616c6c290a636f6e74726163742045564d207b0a0a202020202f2f20456e7469746c656d656e747320656e61626c696e672066696e65722d6772616e65642061636365737320636f6e74726f6c206f6e206120436164656e63654f776e65644163636f756e740a2020202061636365737328616c6c2920656e7469746c656d656e742056616c69646174650a2020202061636365737328616c6c2920656e7469746c656d656e742057697468647261770a2020202061636365737328616c6c2920656e7469746c656d656e742043616c6c0a2020202061636365737328616c6c2920656e7469746c656d656e74204465706c6f790a2020202061636365737328616c6c2920656e7469746c656d656e74204f776e65720a2020202061636365737328616c6c2920656e7469746c656d656e74204272696467650a0a2020202061636365737328616c6c290a202020206576656e7420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a205b55496e74383b2032305d290a0a202020202f2f2f20464c4f57546f6b656e734465706f736974656420697320656d6974746564207768656e20464c4f5720746f6b656e7320697320627269646765640a202020202f2f2f20696e746f207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f20464c4f57546f6b656e7357697468647261776e20697320656d6974746564207768656e20464c4f5720746f6b656e732061726520627269646765640a202020202f2f2f206f7574206f66207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f204272696467654163636573736f725570646174656420697320656d6974746564207768656e20746865204272696467654163636573736f72204361706162696c6974790a202020202f2f2f206973207570646174656420696e207468652073746f72656420427269646765526f7574657220616c6f6e672077697468206964656e74696679696e670a202020202f2f2f20696e666f726d6174696f6e2061626f757420626f74682e0a2020202061636365737328616c6c290a202020206576656e74204272696467654163636573736f7255706461746564280a2020202020202020726f75746572547970653a20547970652c0a2020202020202020726f75746572555549443a2055496e7436342c0a2020202020202020726f75746572416464726573733a20416464726573732c0a20202020202020206163636573736f72547970653a20547970652c0a20202020202020206163636573736f72555549443a2055496e7436342c0a20202020202020206163636573736f72416464726573733a20416464726573730a20202020290a0a202020202f2f2f2045564d4164647265737320697320616e2045564d2d636f6d70617469626c6520616464726573730a2020202061636365737328616c6c290a202020207374727563742045564d41646472657373207b0a0a20202020202020202f2f2f204279746573206f662074686520616464726573730a202020202020202061636365737328616c6c290a20202020202020206c65742062797465733a205b55496e74383b2032305d0a0a20202020202020202f2f2f20436f6e737472756374732061206e65772045564d20616464726573732066726f6d2074686520676976656e206279746520726570726573656e746174696f6e0a20202020202020207669657720696e69742862797465733a205b55496e74383b2032305d29207b0a20202020202020202020202073656c662e6279746573203d2062797465730a20202020202020207d0a0a20202020202020202f2f2f2042616c616e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a2020202020202020202020206c65742062616c616e6365203d20496e7465726e616c45564d2e62616c616e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020202020202072657475726e2042616c616e6365286174746f666c6f773a2062616c616e6365290a20202020202020207d0a0a20202020202020202f2f2f204e6f6e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206e6f6e636528293a2055496e743634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e6e6f6e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f6465206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f646528293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f6465280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f646548617368206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f64654861736828293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f646548617368280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f207468652045564d206163636f756e7420776974682074686520676976656e20616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a2020202020202020202020206c657420616d6f756e74203d2066726f6d2e62616c616e63650a202020202020202020202020696620616d6f756e74203d3d20302e30207b0a2020202020202020202020202020202070616e6963282263616c6c696e67206465706f7369742066756e6374696f6e207769746820616e20656d707479207661756c74206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a202020202020202020202020496e7465726e616c45564d2e6465706f736974280a2020202020202020202020202020202066726f6d3a203c2d66726f6d2c0a20202020202020202020202020202020746f3a2073656c662e62797465730a202020202020202020202020290a202020202020202020202020656d697420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a2073656c662e62797465732c20616d6f756e743a20616d6f756e74290a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207374727563742042616c616e6365207b0a0a20202020202020202f2f2f205468652062616c616e636520696e206174746f2d464c4f570a20202020202020202f2f2f204174746f2d464c4f572069732074686520736d616c6c6573742064656e6f6d696e6174696f6e206f6620464c4f5720283165313820464c4f57290a20202020202020202f2f2f2074686174206973207573656420746f2073746f7265206163636f756e742062616c616e63657320696e736964652045564d0a20202020202020202f2f2f2073696d696c617220746f207468652077617920574549206973207573656420746f2073746f72652045544820646976697369626c6520746f20313820646563696d616c20706c616365732e0a202020202020202061636365737328616c6c290a2020202020202020766172206174746f666c6f773a2055496e740a0a20202020202020202f2f2f20436f6e737472756374732061206e65772062616c616e63650a202020202020202061636365737328616c6c290a20202020202020207669657720696e6974286174746f666c6f773a2055496e7429207b0a20202020202020202020202073656c662e6174746f666c6f77203d206174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2053657473207468652062616c616e636520627920612055466978363420283820646563696d616c20706f696e7473292c2074686520666f726d61740a20202020202020202f2f2f2074686174206973207573656420696e20436164656e636520746f2073746f726520464c4f5720746f6b656e732e0a202020202020202061636365737328616c6c290a202020202020202066756e20736574464c4f5728666c6f773a20554669783634297b0a20202020202020202020202073656c662e6174746f666c6f77203d20496e7465726e616c45564d2e63617374546f4174746f464c4f572862616c616e63653a20666c6f77290a20202020202020207d0a0a20202020202020202f2f2f204361737473207468652062616c616e636520746f2061205546697836342028726f756e64696e6720646f776e290a20202020202020202f2f2f205761726e696e67212063617374696e6720612062616c616e636520746f20612055466978363420776869636820737570706f7274732061206c6f776572206c6576656c206f6620707265636973696f6e0a20202020202020202f2f2f20283820646563696d616c20706f696e747320696e20636f6d7061726520746f20313829206d6967687420726573756c7420696e20726f756e64696e6720646f776e206572726f722e0a20202020202020202f2f2f205573652074686520746f4174746f466c6f772066756e6374696f6e20696620796f752063617265206e656564206d6f72652061636375726163792e0a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e464c4f5728293a20554669783634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63617374546f464c4f572862616c616e63653a2073656c662e6174746f666c6f77290a20202020202020207d0a0a20202020202020202f2f2f2052657475726e73207468652062616c616e636520696e204174746f2d464c4f570a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e4174746f464c4f5728293a2055496e74207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074727565206966207468652062616c616e6365206973207a65726f0a202020202020202061636365737328616c6c290a202020202020202066756e2069735a65726f28293a20426f6f6c207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f77203d3d20300a20202020202020207d0a202020207d0a0a202020202f2f2f207265706f7274732074686520737461747573206f662065766d20657865637574696f6e2e0a2020202061636365737328616c6c2920656e756d205374617475733a2055496e7438207b0a20202020202020202f2f2f2069732028726172656c79292072657475726e6564207768656e2073746174757320697320756e6b6e6f776e0a20202020202020202f2f2f20616e6420736f6d657468696e672068617320676f6e6520766572792077726f6e672e0a202020202020202061636365737328616c6c29206361736520756e6b6e6f776e0a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206661696c6564206174207468652076616c69646174696f6e20737465702028652e672e206e6f6e6365206d69736d61746368292e0a20202020202020202f2f2f20416e20696e76616c6964207472616e73616374696f6e2f63616c6c2069732072656a656374656420746f2062652065786563757465640a20202020202020202f2f2f206f7220626520696e636c7564656420696e206120626c6f636b2e0a202020202020202061636365737328616c6c29206361736520696e76616c69640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c206275742074686520766d20686173207265706f7274656420616e206572726f722061730a20202020202020202f2f2f20746865206f7574636f6d65206f6620657865637574696f6e2028652e672e2072756e6e696e67206f7574206f6620676173292e0a20202020202020202f2f2f2041206661696c65642074782f63616c6c20697320696e636c7564656420696e206120626c6f636b2e0a20202020202020202f2f2f204e6f746520746861742072657375626d697373696f6e206f662061206661696c6564207472616e73616374696f6e20776f756c640a20202020202020202f2f2f20726573756c7420696e20696e76616c69642073746174757320696e20746865207365636f6e6420617474656d70742c20676976656e0a20202020202020202f2f2f20746865206e6f6e636520776f756c6420626520636f6d6520696e76616c69642e0a202020202020202061636365737328616c6c292063617365206661696c65640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c20616e64206e6f206572726f72206973207265706f727465642062792074686520766d2e0a202020202020202061636365737328616c6c292063617365207375636365737366756c0a202020207d0a0a202020202f2f2f207265706f72747320746865206f7574636f6d65206f662065766d207472616e73616374696f6e2f63616c6c20657865637574696f6e20617474656d70740a2020202061636365737328616c6c292073747275637420526573756c74207b0a20202020202020202f2f2f20737461747573206f662074686520657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c6574207374617475733a205374617475730a0a20202020202020202f2f2f206572726f7220636f646520286572726f7220636f6465207a65726f206d65616e73206e6f206572726f72290a202020202020202061636365737328616c6c290a20202020202020206c6574206572726f72436f64653a2055496e7436340a0a20202020202020202f2f2f2072657475726e732074686520616d6f756e74206f6620676173206d65746572656420647572696e670a20202020202020202f2f2f2065766d20657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c657420676173557365643a2055496e7436340a0a20202020202020202f2f2f2072657475726e7320746865206461746120746861742069732072657475726e65642066726f6d0a20202020202020202f2f2f207468652065766d20666f72207468652063616c6c2e20466f7220636f612e6465706c6f790a20202020202020202f2f2f2063616c6c732069742072657475726e73207468652061646472657373206279746573206f66207468650a20202020202020202f2f2f206e65776c79206465706c6f79656420636f6e74726163742e0a202020202020202061636365737328616c6c290a20202020202020206c657420646174613a205b55496e74385d0a0a2020202020202020696e6974280a2020202020202020202020207374617475733a205374617475732c0a2020202020202020202020206572726f72436f64653a2055496e7436342c0a202020202020202020202020676173557365643a2055496e7436342c0a202020202020202020202020646174613a205b55496e74385d0a202020202020202029207b0a20202020202020202020202073656c662e737461747573203d207374617475730a20202020202020202020202073656c662e6572726f72436f6465203d206572726f72436f64650a20202020202020202020202073656c662e67617355736564203d20676173557365640a20202020202020202020202073656c662e64617461203d20646174610a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204164647265737361626c65207b0a20202020202020202f2f2f205468652045564d20616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d416464726573730a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520436164656e63654f776e65644163636f756e743a204164647265737361626c65207b0a0a20202020202020206163636573732873656c66290a2020202020202020766172206164647265737342797465733a205b55496e74383b2032305d0a0a2020202020202020696e69742829207b0a2020202020202020202020202f2f206164647265737320697320696e697469616c6c792073657420746f207a65726f0a2020202020202020202020202f2f206275742075706461746564207468726f75676820696e697441646472657373206c617465720a2020202020202020202020202f2f207765206861766520746f20646f20746869732073696e6365207765206e656564207265736f75726365206964202875756964290a2020202020202020202020202f2f20746f2063616c63756c617465207468652045564d206164647265737320666f72207468697320636164656e6365206f776e6564206163636f756e740a20202020202020202020202073656c662e616464726573734279746573203d205b302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20305d0a20202020202020207d0a0a202020202020202061636365737328636f6e7472616374290a202020202020202066756e20696e697441646472657373286164647265737342797465733a205b55496e74383b2032305d29207b0a20202020202020202020202f2f206f6e6c7920616c6c6f7720736574206164647265737320666f72207468652066697273742074696d650a20202020202020202020202f2f20636865636b206164647265737320697320656d7074790a202020202020202020202020666f72206974656d20696e2073656c662e616464726573734279746573207b0a20202020202020202020202020202020617373657274286974656d203d3d20302c206d6573736167653a2022616464726573732062797465206973206e6f7420656d70747922290a2020202020202020202020207d0a202020202020202020202073656c662e616464726573734279746573203d206164647265737342797465730a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d41646472657373207b0a2020202020202020202020202f2f20416c77617973206372656174652061206e65772045564d4164647265737320696e7374616e63650a20202020202020202020202072657475726e2045564d416464726573732862797465733a2073656c662e616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f204765742062616c616e6365206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a20202020202020202020202072657475726e2073656c662e6164647265737328292e62616c616e636528290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a20202020202020202020202073656c662e6164647265737328292e6465706f7369742866726f6d3a203c2d66726f6d290a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e7420626568696e6420616e20656e7469746c656d656e742c20616374696e672061732070726f6f66206f66206163636573730a2020202020202020616363657373284f776e6572207c2056616c6964617465290a2020202020202020766965772066756e2070726f7465637465644164647265737328293a2045564d41646472657373207b0a20202020202020202020202072657475726e2073656c662e6164647265737328290a20202020202020207d0a0a20202020202020202f2f2f20576974686472617773207468652062616c616e63652066726f6d2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a20202020202020202f2f2f204e6f7465207468617420616d6f756e747320736d616c6c6572207468616e2031306e4620283130652d38292063616e27742062652077697468647261776e0a20202020202020202f2f2f20676976656e207468617420466c6f7720546f6b656e205661756c747320757365205546697836347320746f2073746f72652062616c616e6365732e0a20202020202020202f2f2f2049662074686520676976656e2062616c616e636520636f6e76657273696f6e20746f2055466978363420726573756c747320696e0a20202020202020202f2f2f20726f756e64696e67206572726f722c20746869732066756e6374696f6e20776f756c64206661696c2e0a2020202020202020616363657373284f776e6572207c205769746864726177290a202020202020202066756e2077697468647261772862616c616e63653a2042616c616e6365293a2040466c6f77546f6b656e2e5661756c74207b0a20202020202020202020202069662062616c616e63652e69735a65726f2829207b0a2020202020202020202020202020202070616e6963282263616c6c696e672077697468647261772066756e6374696f6e2077697468207a65726f2062616c616e6365206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a2020202020202020202020206c6574207661756c74203c2d20496e7465726e616c45564d2e7769746864726177280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020616d6f756e743a2062616c616e63652e6174746f666c6f770a20202020202020202020202029206173212040466c6f77546f6b656e2e5661756c740a202020202020202020202020656d697420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a2073656c662e6164647265737342797465732c20616d6f756e743a2062616c616e63652e696e464c4f572829290a20202020202020202020202072657475726e203c2d7661756c740a20202020202020207d0a0a20202020202020202f2f2f204465706c6f7973206120636f6e747261637420746f207468652045564d20656e7669726f6e6d656e742e0a20202020202020202f2f2f2052657475726e73207468652061646472657373206f6620746865206e65776c79206465706c6f79656420636f6e74726163740a2020202020202020616363657373284f776e6572207c204465706c6f79290a202020202020202066756e206465706c6f79280a202020202020202020202020636f64653a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a2045564d41646472657373207b0a2020202020202020202020206c657420616464726573734279746573203d20496e7465726e616c45564d2e6465706c6f79280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020636f64653a20636f64652c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020290a20202020202020202020202072657475726e2045564d416464726573732862797465733a20616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f2043616c6c7320612066756e6374696f6e20776974682074686520676976656e20646174612e0a20202020202020202f2f2f2054686520657865637574696f6e206973206c696d697465642062792074686520676976656e20616d6f756e74206f66206761730a2020202020202020616363657373284f776e6572207c2043616c6c290a202020202020202066756e2063616c6c280a202020202020202020202020746f3a2045564d416464726573732c0a202020202020202020202020646174613a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a20526573756c74207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63616c6c280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020746f3a20746f2e62797465732c0a20202020202020202020202020202020646174613a20646174612c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020292061732120526573756c740a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e465420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f7369744e4654286e66743a203c2d6e66742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e46542066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e2074686520726571756573746564204e465420696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e2077697468647261774e4654280a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e77697468647261774e4654280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a2020202020202020202020202020202069643a2069642c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e205661756c7420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f736974546f6b656e73287661756c743a203c2d7661756c742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e2066756e6769626c6520746f6b656e732066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720610a20202020202020202f2f2f2066656520746f2066756c66696c6c207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e207468652072657175657374656420746f6b656e7320262073756666696369656e742062616c616e6365206f660a20202020202020202f2f2f2072657175657374656420746f6b656e7320696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e207769746864726177546f6b656e73280a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e7769746864726177546f6b656e73280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a20202020202020202020202020202020616d6f756e743a20616d6f756e742c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a202020207d0a0a202020202f2f2f20437265617465732061206e657720636164656e6365206f776e6564206163636f756e740a2020202061636365737328616c6c290a2020202066756e20637265617465436164656e63654f776e65644163636f756e7428293a2040436164656e63654f776e65644163636f756e74207b0a20202020202020206c657420616363203c2d63726561746520436164656e63654f776e65644163636f756e7428290a20202020202020206c65742061646472203d20496e7465726e616c45564d2e637265617465436164656e63654f776e65644163636f756e7428757569643a206163632e75756964290a20202020202020206163632e696e697441646472657373286164647265737342797465733a2061646472290a2020202020202020656d697420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a2061646472290a202020202020202072657475726e203c2d6163630a202020207d0a0a202020202f2f2f2052756e7320616e206120524c502d656e636f6465642045564d207472616e73616374696f6e2c2064656475637473207468652067617320666565732c0a202020202f2f2f20616e64206465706f736974732074686520676173206665657320696e746f207468652070726f766964656420636f696e6261736520616464726573732e0a2020202061636365737328616c6c290a2020202066756e2072756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a202020202020202072657475726e20496e7465726e616c45564d2e72756e280a2020202020202020202020202020202074783a2074782c0a20202020202020202020202020202020636f696e626173653a20636f696e626173652e62797465730a2020202020202020292061732120526573756c740a202020207d0a0a202020202f2f2f206d75737452756e2072756e7320746865207472616e73616374696f6e207573696e672045564d2e72756e207965742069740a202020202f2f2f20726f6c6c6261636b2069662074686520747820657865637574696f6e2073746174757320697320756e6b6e6f776e206f7220696e76616c69642e0a202020202f2f2f204e6f746520746861742074686973206d6574686f6420646f6573206e6f7420726f6c6c6261636b206966207472616e73616374696f6e0a202020202f2f2f2069732065786563757465642062757420616e20766d206572726f72206973207265706f7274656420617320746865206f7574636f6d650a202020202f2f2f206f662074686520657865637574696f6e20287374617475733a206661696c6564292e0a2020202061636365737328616c6c290a2020202066756e206d75737452756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a20202020202020206c65742072756e526573756c74203d2073656c662e72756e2874783a2074782c20636f696e626173653a20636f696e62617365290a2020202020202020617373657274280a20202020202020202020202072756e526573756c742e737461747573203d3d205374617475732e6661696c6564207c7c2072756e526573756c742e737461747573203d3d205374617475732e7375636365737366756c2c0a2020202020202020202020206d6573736167653a20227478206973206e6f742076616c696420666f7220657865637574696f6e220a2020202020202020290a202020202020202072657475726e2072756e526573756c740a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249285f2076616c7565733a205b416e795374727563745d293a205b55496e74385d207b0a202020202020202072657475726e20496e7465726e616c45564d2e656e636f64654142492876616c756573290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f64654142492874797065733a205b547970655d2c20646174613a205b55496e74385d293a205b416e795374727563745d207b0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a20202020202020205f2076616c7565733a205b416e795374727563745d0a20202020293a205b55496e74385d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a20202020202020206c657420617267756d656e7473203d20496e7465726e616c45564d2e656e636f64654142492876616c756573290a0a202020202020202072657475726e206d6574686f6449442e636f6e63617428617267756d656e7473290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a202020202020202074797065733a205b547970655d2c0a2020202020202020646174613a205b55496e74385d0a20202020293a205b416e795374727563745d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a0a2020202020202020666f72206279746520696e206d6574686f644944207b0a2020202020202020202020206966206279746520213d20646174612e72656d6f766546697273742829207b0a2020202020202020202020202020202070616e696328227369676e6174757265206d69736d6174636822290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a202020202f2f2f2056616c69646174696f6e526573756c742072657475726e732074686520726573756c74206f6620434f41206f776e6572736869702070726f6f662076616c69646174696f6e0a2020202061636365737328616c6c290a202020207374727563742056616c69646174696f6e526573756c74207b0a202020202020202061636365737328616c6c290a20202020202020206c657420697356616c69643a20426f6f6c0a0a202020202020202061636365737328616c6c290a20202020202020206c65742070726f626c656d3a20537472696e673f0a0a2020202020202020696e697428697356616c69643a20426f6f6c2c2070726f626c656d3a20537472696e673f29207b0a20202020202020202020202073656c662e697356616c6964203d20697356616c69640a20202020202020202020202073656c662e70726f626c656d203d2070726f626c656d0a20202020202020207d0a202020207d0a0a202020202f2f2f2076616c6964617465434f414f776e65727368697050726f6f662076616c696461746573206120434f41206f776e6572736869702070726f6f660a2020202061636365737328616c6c290a2020202066756e2076616c6964617465434f414f776e65727368697050726f6f66280a2020202020202020616464726573733a20416464726573732c0a2020202020202020706174683a205075626c6963506174682c0a20202020202020207369676e6564446174613a205b55496e74385d2c0a20202020202020206b6579496e64696365733a205b55496e7436345d2c0a20202020202020207369676e6174757265733a205b5b55496e74385d5d2c0a202020202020202065766d416464726573733a205b55496e74383b2032305d0a20202020293a2056616c69646174696f6e526573756c74207b0a0a20202020202020202f2f206d616b65207369676e6174757265207365742066697273740a20202020202020202f2f20636865636b206e756d626572206f66207369676e617475726573206d617463686573206e756d626572206f66206b657920696e64696365730a20202020202020206966206b6579496e64696365732e6c656e67746820213d207369676e6174757265732e6c656e677468207b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a20226b657920696e64696365732073697a6520646f65736e2774206d6174636820746865207369676e617475726573220a202020202020202020202020290a20202020202020207d0a0a2020202020202020766172207369676e61747572655365743a205b43727970746f2e4b65794c6973745369676e61747572655d203d205b5d0a2020202020202020666f72207369676e6174757265496e6465782c207369676e617475726520696e207369676e6174757265737b0a2020202020202020202020207369676e61747572655365742e617070656e642843727970746f2e4b65794c6973745369676e6174757265280a202020202020202020202020202020206b6579496e6465783a20496e74286b6579496e64696365735b7369676e6174757265496e6465785d292c0a202020202020202020202020202020207369676e61747572653a207369676e61747572650a20202020202020202020202029290a20202020202020207d0a0a20202020202020202f2f206665746368206163636f756e740a20202020202020206c657420616363203d206765744163636f756e742861646472657373290a0a20202020202020202f2f20636f6e737472756374696e67206b6579206c6973740a20202020202020206c6574206b65794c697374203d2043727970746f2e4b65794c69737428290a2020202020202020666f72207369676e617475726520696e207369676e6174757265536574207b0a2020202020202020202020206c6574206b6579203d206163632e6b6579732e676574286b6579496e6465783a207369676e61747572652e6b6579496e64657829210a20202020202020202020202061737365727428216b65792e69735265766f6b65642c206d6573736167653a20227265766f6b6564206b6579206973207573656422290a2020202020202020202020206b65794c6973742e616464280a20202020202020202020202020206b65792e7075626c69634b65792c0a202020202020202020202020202068617368416c676f726974686d3a206b65792e68617368416c676f726974686d2c0a20202020202020202020202020207765696768743a206b65792e7765696768742c0a2020202020202020202020290a20202020202020207d0a0a20202020202020206c657420697356616c6964203d206b65794c6973742e766572696679280a2020202020202020202020207369676e61747572655365743a207369676e61747572655365742c0a2020202020202020202020207369676e6564446174613a207369676e6564446174612c0a202020202020202020202020646f6d61696e53657061726174696f6e5461673a2022464c4f572d56302e302d75736572220a2020202020202020290a0a202020202020202069662021697356616c69647b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a202274686520676976656e207369676e61747572657320617265206e6f742076616c6964206f722070726f7669646520656e6f75676820776569676874220a202020202020202020202020290a20202020202020207d0a0a20202020202020206c657420636f61526566203d206163632e6361706162696c69746965732e626f72726f773c2645564d2e436164656e63654f776e65644163636f756e743e2870617468290a2020202020202020696620636f61526566203d3d206e696c207b0a2020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202070726f626c656d3a2022636f756c64206e6f7420626f72726f7720627269646765206163636f756e742773207265736f75726365220a20202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f207665726966792065766d2061646472657373206d61746368696e670a20202020202020207661722061646472203d20636f61526566212e6164647265737328290a2020202020202020666f7220696e6465782c206974656d20696e20636f61526566212e6164647265737328292e6279746573207b0a2020202020202020202020206966206974656d20213d2065766d416464726573735b696e6465785d207b0a2020202020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202020202070726f626c656d3a202265766d2061646472657373206d69736d61746368220a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e2056616c69646174696f6e526573756c74280a202020202020202020202020697356616c69643a20747275652c0a20202020202020202020202070726f626c656d3a206e696c0a2020202020202020290a202020207d0a0a202020202f2f2f20426c6f636b2072657475726e7320696e666f726d6174696f6e2061626f757420746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a202020207374727563742045564d426c6f636b207b0a202020202020202061636365737328616c6c290a20202020202020206c6574206865696768743a2055496e7436340a0a202020202020202061636365737328616c6c290a20202020202020206c657420686173683a20537472696e670a0a202020202020202061636365737328616c6c290a20202020202020206c657420746f74616c537570706c793a20496e740a0a2020202020202020696e6974286865696768743a2055496e7436342c20686173683a20537472696e672c20746f74616c537570706c793a20496e7429207b0a20202020202020202020202073656c662e686569676874203d206865696768740a20202020202020202020202073656c662e68617368203d20686173680a20202020202020202020202073656c662e746f74616c537570706c79203d20746f74616c537570706c790a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e7320746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a2020202066756e206765744c6174657374426c6f636b28293a2045564d426c6f636b207b0a202020202020202072657475726e20496e7465726e616c45564d2e6765744c6174657374426c6f636b2829206173212045564d426c6f636b0a202020207d0a0a202020202f2f2f20496e7465726661636520666f722061207265736f75726365207768696368206163747320617320616e20656e747279706f696e7420746f2074686520564d206272696467650a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204272696467654163636573736f72207b0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e465420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e46542066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e2077697468647261774e4654280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620612066756e6769626c6520746f6b656e207661756c7420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f662066756e6769626c6520746f6b656e732066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e207769746864726177546f6b656e73280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d0a202020207d0a0a202020202f2f2f20496e746572666163652077686963682063617074757265732061204361706162696c69747920746f2074686520627269646765204163636573736f722c20736176696e672069742077697468696e2074686520427269646765526f75746572207265736f757263650a2020202061636365737328616c6c290a202020207265736f7572636520696e7465726661636520427269646765526f75746572207b0a0a20202020202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a2020202020202020616363657373284272696467652920766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d0a0a20202020202020202f2f2f205365747320746865204272696467654163636573736f72204361706162696c69747920696e2074686520427269646765526f757465720a202020202020202061636365737328427269646765292066756e207365744272696467654163636573736f72285f206163636573736f723a204361706162696c6974793c61757468284272696467652920267b4272696467654163636573736f727d3e29207b0a202020202020202020202020707265207b0a202020202020202020202020202020206163636573736f722e636865636b28293a2022496e76616c6964204272696467654163636573736f72204361706162696c6974792070726f7669646564220a20202020202020202020202020202020656d6974204272696467654163636573736f7255706461746564280a2020202020202020202020202020202020202020726f75746572547970653a2073656c662e6765745479706528292c0a2020202020202020202020202020202020202020726f75746572555549443a2073656c662e757569642c0a2020202020202020202020202020202020202020726f75746572416464726573733a2073656c662e6f776e65723f2e61646472657373203f3f2070616e69632822526f75746572206d757374206861766520616e206f776e657220746f206265206964656e74696669656422292c0a20202020202020202020202020202020202020206163636573736f72547970653a206163636573736f722e626f72726f7728292e6765745479706528292c0a20202020202020202020202020202020202020206163636573736f72555549443a206163636573736f722e626f72726f772829212e757569642c0a20202020202020202020202020202020202020206163636573736f72416464726573733a206163636573736f722e616464726573730a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a202020206163636573732873656c66290a20202020766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d207b0a202020202020202072657475726e2073656c662e6163636f756e742e73746f726167652e626f72726f773c61757468284272696467652920267b427269646765526f757465727d3e2866726f6d3a202f73746f726167652f65766d427269646765526f75746572290a2020202020202020202020203f2e626f72726f774272696467654163636573736f7228290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f207468652045564d2062726964676522290a202020207d0a7d0a" access(all) let compiledFactoryBytecode = "608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61484a806100a56000396000f3fe60806040523480156200001157600080fd5b5060043610620000c35760003560e01c8063715018a6116200007a578063715018a6146200018f5780638da5cb5b146200019b578063d56e0ccf14620001ad578063daa09e5414620001e4578063f2fde38b14620001fb578063f93241dd146200021257600080fd5b806304433bbc14620000c85780630a2c0ce914620000fc578063263e0c1b1462000122578063335f4c76146200014a57806340f8d42b146200016157806361a169051462000178575b600080fd5b620000df620000d936600462000c0a565b62000229565b6040516001600160a01b0390911681526020015b60405180910390f35b620001136200010d36600462000c4b565b6200025c565b604051620000f3919062000cd1565b620001396200013336600462000c4b565b62000310565b6040519015158152602001620000f3565b620001396200015b36600462000c4b565b62000724565b620000df6200017236600462000ce6565b62000752565b620000df6200018936600462000ce6565b62000853565b6200019962000942565b005b6000546001600160a01b0316620000df565b620000df620001be36600462000c0a565b80516020818301810180516001825292820191909301209152546001600160a01b031681565b62000139620001f536600462000c4b565b6200095a565b620001996200020c36600462000c4b565b620009da565b620001136200022336600462000c4b565b62000a22565b60006001826040516200023d919062000dc8565b908152604051908190036020019020546001600160a01b031692915050565b6001600160a01b0381166000908152600260205260409020805460609190620002859062000de6565b80601f0160208091040260200160405190810160405280929190818152602001828054620002b39062000de6565b8015620003045780601f10620002d85761010080835404028352916020019162000304565b820191906000526020600020905b815481529060010190602001808311620002e657829003601f168201915b50505050509050919050565b60408051600481526024810182526020810180516001600160e01b03166318160ddd60e01b1790529051600091829182916001600160a01b0386169162000358919062000dc8565b600060405180830381855afa9150503d806000811462000395576040519150601f19603f3d011682016040523d82523d6000602084013e6200039a565b606091505b5091509150811580620003ac57508051155b15620003bc575060009392505050565b604051600060248201526001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b179052516200040b919062000dc8565b600060405180830381855afa9150503d806000811462000448576040519150601f19603f3d011682016040523d82523d6000602084013e6200044d565b606091505b5090925090508115806200046057508051155b1562000470575060009392505050565b60405160006024820181905260448201526001600160a01b0385169060640160408051601f198184030181529181526020820180516001600160e01b0316636eb1769f60e11b17905251620004c6919062000dc8565b600060405180830381855afa9150503d806000811462000503576040519150601f19603f3d011682016040523d82523d6000602084013e62000508565b606091505b5090925090508115806200051b57508051155b156200052b575060009392505050565b60408051600481526024810182526020810180516001600160e01b03166306fdde0360e01b17905290516001600160a01b038616916200056b9162000dc8565b600060405180830381855afa9150503d8060008114620005a8576040519150601f19603f3d011682016040523d82523d6000602084013e620005ad565b606091505b509092509050811580620005c057508051155b15620005d0575060009392505050565b60408051600481526024810182526020810180516001600160e01b03166395d89b4160e01b17905290516001600160a01b03861691620006109162000dc8565b600060405180830381855afa9150503d80600081146200064d576040519150601f19603f3d011682016040523d82523d6000602084013e62000652565b606091505b5090925090508115806200066557508051155b1562000675575060009392505050565b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290516001600160a01b03861691620006b59162000dc8565b600060405180830381855afa9150503d8060008114620006f2576040519150601f19603f3d011682016040523d82523d6000602084013e620006f7565b606091505b5090925090508115806200070a57508051155b156200071a575060009392505050565b5060019392505050565b6001600160a01b03811660009081526002602052604081208054620007499062000de6565b15159392505050565b60006200075e62000ac4565b600080546001600160a01b031687878787876040516200077e9062000b43565b6200078f9695949392919062000e22565b604051809103906000f080158015620007ac573d6000803e3d6000fd5b50905080600185604051620007c2919062000dc8565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918316600090815260029091522062000807858262000f00565b507f99a64021330f1af36b3fd5f64a1d12b99b8ddf91fa553618c4df01ffba4c1cee81888888886040516200084195949392919062000fcd565b60405180910390a19695505050505050565b60006200085f62000ac4565b600080546001600160a01b031687878787876040516200087f9062000b51565b620008909695949392919062000e22565b604051809103906000f080158015620008ad573d6000803e3d6000fd5b50905080600185604051620008c3919062000dc8565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918316600090815260029091522062000908858262000f00565b507fbebce54951ebf20c0dcd195a45bb2388d9ac8e38b5974e00bb63c5822dbe65f081888888886040516200084195949392919062000fcd565b6200094c62000ac4565b62000958600062000af3565b565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526000906001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015620009c7575060408051601f3d908101601f19168201909252620009c4918101906200103f565b60015b620009d457506000919050565b92915050565b620009e462000ac4565b6001600160a01b03811662000a1457604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000a1f8162000af3565b50565b6002602052600090815260409020805462000a3d9062000de6565b80601f016020809104026020016040519081016040528092919081815260200182805462000a6b9062000de6565b801562000abc5780601f1062000a905761010080835404028352916020019162000abc565b820191906000526020600020905b81548152906001019060200180831162000a9e57829003601f168201915b505050505081565b6000546001600160a01b03163314620009585760405163118cdaa760e01b815233600482015260240162000a0b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6118fa806200106483390190565b611eb7806200295e83390190565b634e487b7160e01b600052604160045260246000fd5b600082601f83011262000b8757600080fd5b813567ffffffffffffffff8082111562000ba55762000ba562000b5f565b604051601f8301601f19908116603f0116810190828211818310171562000bd05762000bd062000b5f565b8160405283815286602085880101111562000bea57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121562000c1d57600080fd5b813567ffffffffffffffff81111562000c3557600080fd5b62000c438482850162000b75565b949350505050565b60006020828403121562000c5e57600080fd5b81356001600160a01b038116811462000c7657600080fd5b9392505050565b60005b8381101562000c9a57818101518382015260200162000c80565b50506000910152565b6000815180845262000cbd81602086016020860162000c7d565b601f01601f19169290920160200192915050565b60208152600062000c76602083018462000ca3565b600080600080600060a0868803121562000cff57600080fd5b853567ffffffffffffffff8082111562000d1857600080fd5b62000d2689838a0162000b75565b9650602088013591508082111562000d3d57600080fd5b62000d4b89838a0162000b75565b9550604088013591508082111562000d6257600080fd5b62000d7089838a0162000b75565b9450606088013591508082111562000d8757600080fd5b62000d9589838a0162000b75565b9350608088013591508082111562000dac57600080fd5b5062000dbb8882890162000b75565b9150509295509295909350565b6000825162000ddc81846020870162000c7d565b9190910192915050565b600181811c9082168062000dfb57607f821691505b60208210810362000e1c57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038716815260c06020820181905260009062000e489083018862000ca3565b828103604084015262000e5c818862000ca3565b9050828103606084015262000e72818762000ca3565b9050828103608084015262000e88818662000ca3565b905082810360a084015262000e9e818562000ca3565b9998505050505050505050565b601f82111562000efb576000816000526020600020601f850160051c8101602086101562000ed65750805b601f850160051c820191505b8181101562000ef75782815560010162000ee2565b5050505b505050565b815167ffffffffffffffff81111562000f1d5762000f1d62000b5f565b62000f358162000f2e845462000de6565b8462000eab565b602080601f83116001811462000f6d576000841562000f545750858301515b600019600386901b1c1916600185901b17855562000ef7565b600085815260208120601f198616915b8281101562000f9e5788860151825594840194600190910190840162000f7d565b508582101562000fbd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b038616815260a06020820181905260009062000ff39083018762000ca3565b828103604084015262001007818762000ca3565b905082810360608401526200101d818662000ca3565b9050828103608084015262001033818562000ca3565b98975050505050505050565b6000602082840312156200105257600080fd5b8151801515811462000c7657600080fdfe6101606040523480156200001257600080fd5b50604051620018fa380380620018fa833981016040819052620000359162000357565b6040805180820190915260018152603160f81b6020820152859081908882886003620000628382620004db565b506004620000718282620004db565b5050506001600160a01b038116620000a457604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000af816200019f565b50620000bd826006620001f1565b61012052620000ce816007620001f1565b61014052815160208084019190912060e052815190820120610100524660a0526200015c60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506009620001748482620004db565b50600a620001838382620004db565b50600b620001928282620004db565b5050505050505062000601565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602083511015620002115762000209836200022a565b905062000224565b816200021e8482620004db565b5060ff90505b92915050565b600080829050601f8151111562000258578260405163305a27a960e01b81526004016200009b9190620005a7565b80516200026582620005dc565b179392505050565b80516001600160a01b03811681146200028557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620002bd578181015183820152602001620002a3565b50506000910152565b600082601f830112620002d857600080fd5b81516001600160401b0380821115620002f557620002f56200028a565b604051601f8301601f19908116603f011681019082821181831017156200032057620003206200028a565b816040528381528660208588010111156200033a57600080fd5b6200034d846020830160208901620002a0565b9695505050505050565b60008060008060008060c087890312156200037157600080fd5b6200037c876200026d565b60208801519096506001600160401b03808211156200039a57600080fd5b620003a88a838b01620002c6565b96506040890151915080821115620003bf57600080fd5b620003cd8a838b01620002c6565b95506060890151915080821115620003e457600080fd5b620003f28a838b01620002c6565b945060808901519150808211156200040957600080fd5b620004178a838b01620002c6565b935060a08901519150808211156200042e57600080fd5b506200043d89828a01620002c6565b9150509295509295509295565b600181811c908216806200045f57607f821691505b6020821081036200048057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004d6576000816000526020600020601f850160051c81016020861015620004b15750805b601f850160051c820191505b81811015620004d257828155600101620004bd565b5050505b505050565b81516001600160401b03811115620004f757620004f76200028a565b6200050f816200050884546200044a565b8462000486565b602080601f8311600181146200054757600084156200052e5750858301515b600019600386901b1c1916600185901b178555620004d2565b600085815260208120601f198616915b82811015620005785788860151825594840194600190910190840162000557565b5085821015620005975787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020815260008251806020840152620005c8816040850160208701620002a0565b601f01601f19169190910160400192915050565b80516020808301519190811015620004805760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161129e6200065c6000396000610a8801526000610a5b01526000610918015260006108f00152600061084b015260006108750152600061089f015261129e6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063715018a6116100de578063a76b4d5611610097578063dc9716eb11610071578063dc9716eb146102f8578063dd62ed3e14610300578063e8a3d48514610339578063f2fde38b1461034157600080fd5b8063a76b4d56146102ca578063a9059cbb146102d2578063d505accf146102e557600080fd5b8063715018a61461025e57806379cc6790146102665780637ecebe001461027957806384b0196e1461028c5780638da5cb5b146102a757806395d89b41146102c257600080fd5b8063313ce56711610130578063313ce567146101ee5780633644e515146101fd5780633fd4d4a81461020557806340c10f191461020d57806342966c681461022257806370a082311461023557600080fd5b806306fdde0314610178578063095ea7b3146101965780630cd9acb7146101b9578063120a88ad146101c157806318160ddd146101c957806323b872dd146101db575b600080fd5b610180610354565b60405161018d9190610fe8565b60405180910390f35b6101a96101a436600461101e565b6103e6565b604051901515815260200161018d565b610180610400565b61018061048e565b6002545b60405190815260200161018d565b6101a96101e9366004611048565b61049d565b6040516012815260200161018d565b6101cd6104c1565b6101806104d0565b61022061021b36600461101e565b6104df565b005b610220610230366004611084565b6104f5565b6101cd61024336600461109d565b6001600160a01b031660009081526020819052604090205490565b610220610502565b61022061027436600461101e565b610516565b6101cd61028736600461109d565b61052b565b610294610549565b60405161018d97969594939291906110b8565b6005546040516001600160a01b03909116815260200161018d565b61018061058f565b61018061059e565b6101a96102e036600461101e565b6105ab565b6102206102f3366004611151565b6105b9565b6101806106f8565b6101cd61030e3660046111c4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610180610705565b61022061034f36600461109d565b610714565b606060038054610363906111f7565b80601f016020809104026020016040519081016040528092919081815260200182805461038f906111f7565b80156103dc5780601f106103b1576101008083540402835291602001916103dc565b820191906000526020600020905b8154815290600101906020018083116103bf57829003601f168201915b5050505050905090565b6000336103f481858561074f565b60019150505b92915050565b6009805461040d906111f7565b80601f0160208091040260200160405190810160405280929190818152602001828054610439906111f7565b80156104865780601f1061045b57610100808354040283529160200191610486565b820191906000526020600020905b81548152906001019060200180831161046957829003601f168201915b505050505081565b606060098054610363906111f7565b6000336104ab858285610761565b6104b68585856107df565b506001949350505050565b60006104cb61083e565b905090565b6060600a8054610363906111f7565b6104e7610969565b6104f18282610996565b5050565b6104ff33826109cc565b50565b61050a610969565b6105146000610a02565b565b610521823383610761565b6104f182826109cc565b6001600160a01b0381166000908152600860205260408120546103fa565b60006060806000806000606061055d610a54565b610565610a81565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b606060048054610363906111f7565b600b805461040d906111f7565b6000336103f48185856107df565b834211156105e25760405163313c898160e11b8152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861062f8c6001600160a01b0316600090815260086020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061068a82610aae565b9050600061069a82878787610adb565b9050896001600160a01b0316816001600160a01b0316146106e1576040516325c0072360e11b81526001600160a01b0380831660048301528b1660248201526044016105d9565b6106ec8a8a8a61074f565b50505050505050505050565b600a805461040d906111f7565b6060600b8054610363906111f7565b61071c610969565b6001600160a01b03811661074657604051631e4fbdf760e01b8152600060048201526024016105d9565b6104ff81610a02565b61075c8383836001610b09565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146107d957818110156107ca57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105d9565b6107d984848484036000610b09565b50505050565b6001600160a01b03831661080957604051634b637e8f60e11b8152600060048201526024016105d9565b6001600160a01b0382166108335760405163ec442f0560e01b8152600060048201526024016105d9565b61075c838383610bde565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561089757507f000000000000000000000000000000000000000000000000000000000000000046145b156108c157507f000000000000000000000000000000000000000000000000000000000000000090565b6104cb604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6005546001600160a01b031633146105145760405163118cdaa760e01b81523360048201526024016105d9565b6001600160a01b0382166109c05760405163ec442f0560e01b8152600060048201526024016105d9565b6104f160008383610bde565b6001600160a01b0382166109f657604051634b637e8f60e11b8152600060048201526024016105d9565b6104f182600083610bde565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606104cb7f00000000000000000000000000000000000000000000000000000000000000006006610d08565b60606104cb7f00000000000000000000000000000000000000000000000000000000000000006007610d08565b60006103fa610abb61083e565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080610aed88888888610db3565b925092509250610afd8282610e82565b50909695505050505050565b6001600160a01b038416610b335760405163e602df0560e01b8152600060048201526024016105d9565b6001600160a01b038316610b5d57604051634a1406b160e11b8152600060048201526024016105d9565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156107d957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610bd091815260200190565b60405180910390a350505050565b6001600160a01b038316610c09578060026000828254610bfe9190611231565b90915550610c7b9050565b6001600160a01b03831660009081526020819052604090205481811015610c5c5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105d9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610c9757600280548290039055610cb6565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610cfb91815260200190565b60405180910390a3505050565b606060ff8314610d2257610d1b83610f3b565b90506103fa565b818054610d2e906111f7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5a906111f7565b8015610da75780601f10610d7c57610100808354040283529160200191610da7565b820191906000526020600020905b815481529060010190602001808311610d8a57829003601f168201915b505050505090506103fa565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610dee5750600091506003905082610e78565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e42573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e6e57506000925060019150829050610e78565b9250600091508190505b9450945094915050565b6000826003811115610e9657610e96611252565b03610e9f575050565b6001826003811115610eb357610eb3611252565b03610ed15760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ee557610ee5611252565b03610f065760405163fce698f760e01b8152600481018290526024016105d9565b6003826003811115610f1a57610f1a611252565b036104f1576040516335e2f38360e21b8152600481018290526024016105d9565b60606000610f4883610f7a565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f8111156103fa57604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b81811015610fc857602081850181015186830182015201610fac565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610ffb6020830184610fa2565b9392505050565b80356001600160a01b038116811461101957600080fd5b919050565b6000806040838503121561103157600080fd5b61103a83611002565b946020939093013593505050565b60008060006060848603121561105d57600080fd5b61106684611002565b925061107460208501611002565b9150604084013590509250925092565b60006020828403121561109657600080fd5b5035919050565b6000602082840312156110af57600080fd5b610ffb82611002565b60ff60f81b881681526000602060e060208401526110d960e084018a610fa2565b83810360408501526110eb818a610fa2565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561113f57835183529284019291840191600101611123565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561116c57600080fd5b61117588611002565b965061118360208901611002565b95506040880135945060608801359350608088013560ff811681146111a757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156111d757600080fd5b6111e083611002565b91506111ee60208401611002565b90509250929050565b600181811c9082168061120b57607f821691505b60208210810361122b57634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156103fa57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea26469706673582212200fea5736ecebd6f4f71e77a0743e7169bb21209a84517a64d4e0a6b0313817b864736f6c6343000817003360806040523480156200001157600080fd5b5060405162001eb738038062001eb7833981016040819052620000349162000202565b858585600062000045838262000386565b50600162000054828262000386565b5050506001600160a01b0381166200008657604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200009181620000cb565b50600c620000a0848262000386565b50600d620000af838262000386565b50600e620000be828262000386565b5050505050505062000452565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200013557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b8160405283815260209250866020858801011115620001c857600080fd5b600091505b83821015620001ec5785820183015181830184015290820190620001cd565b6000602085830101528094505050505092915050565b60008060008060008060c087890312156200021c57600080fd5b62000227876200011d565b60208801519096506001600160401b03808211156200024557600080fd5b620002538a838b0162000150565b965060408901519150808211156200026a57600080fd5b620002788a838b0162000150565b955060608901519150808211156200028f57600080fd5b6200029d8a838b0162000150565b94506080890151915080821115620002b457600080fd5b620002c28a838b0162000150565b935060a0890151915080821115620002d957600080fd5b50620002e889828a0162000150565b9150509295509295509295565b600181811c908216806200030a57607f821691505b6020821081036200032b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000381576000816000526020600020601f850160051c810160208610156200035c5750805b601f850160051c820191505b818110156200037d5782815560010162000368565b5050505b505050565b81516001600160401b03811115620003a257620003a26200013a565b620003ba81620003b38454620002f5565b8462000331565b602080601f831160018114620003f25760008415620003d95750858301515b600019600386901b1c1916600185901b1785556200037d565b600085815260208120601f198616915b82811015620004235788860151825594840194600190910190840162000402565b5085821015620004425787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611a5580620004626000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a76b4d56116100a2578063cd279c7c11610071578063cd279c7c146103a8578063e8a3d485146103bb578063e985e9c5146103c3578063f2fde38b146103d657600080fd5b8063a76b4d5614610372578063b49bbd941461037a578063b88d4fde14610382578063c87b56dd1461039557600080fd5b806394e29329116100de57806394e293291461034757806395d89b411461034f578063a159047b14610357578063a22cb4651461035f57600080fd5b806370a082311461031b578063715018a61461032e5780638da5cb5b1461033657600080fd5b80632f745c59116101715780634f558e791161014b5780634f558e79146102c25780634f6ccce7146102ed5780635e0a9661146103005780636352211e1461030857600080fd5b80632f745c591461028957806342842e0e1461029c57806342966c68146102af57600080fd5b8063095ea7b3116101ad578063095ea7b31461023c57806318160ddd1461025157806318e97fd11461026357806323b872dd1461027657600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063081812fc14610211575b600080fd5b6101e76101e2366004611494565b6103e9565b60405190151581526020015b60405180910390f35b6102046103fa565b6040516101f39190611501565b61022461021f366004611514565b61048c565b6040516001600160a01b0390911681526020016101f3565b61024f61024a366004611549565b6104b5565b005b6009545b6040519081526020016101f3565b61024f61027136600461161f565b6104c4565b61024f610284366004611666565b6104d6565b610255610297366004611549565b610566565b61024f6102aa366004611666565b6105cb565b61024f6102bd366004611514565b6105eb565b6101e76102d0366004611514565b6000908152600260205260409020546001600160a01b0316151590565b6102556102fb366004611514565b6105f7565b610204610650565b610224610316366004611514565b61065f565b6102556103293660046116a2565b61066a565b61024f6106b2565b600b546001600160a01b0316610224565b6102046106c6565b6102046106d5565b6102046106e4565b61024f61036d3660046116bd565b610772565b61020461077d565b61020461078a565b61024f6103903660046116f9565b610797565b6102046103a3366004611514565b6107ae565b61024f6103b6366004611775565b6107b9565b6102046107d5565b6101e76103d13660046117cc565b6107e4565b61024f6103e43660046116a2565b610812565b60006103f482610850565b92915050565b606060008054610409906117ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610435906117ff565b80156104825780601f1061045757610100808354040283529160200191610482565b820191906000526020600020905b81548152906001019060200180831161046557829003601f168201915b5050505050905090565b600061049782610875565b506000828152600460205260409020546001600160a01b03166103f4565b6104c08282336108ae565b5050565b6104cc6108bb565b6104c082826108e8565b6001600160a01b03821661050557604051633250574960e11b8152600060048201526024015b60405180910390fd5b6000610512838333610938565b9050836001600160a01b0316816001600160a01b031614610560576040516364283d7b60e01b81526001600160a01b03808616600483015260248201849052821660448201526064016104fc565b50505050565b60006105718361066a565b82106105a25760405163295f44f760e21b81526001600160a01b0384166004820152602481018390526044016104fc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6105e683838360405180602001604052806000815250610797565b505050565b6104c060008233610938565b600061060260095490565b821061062b5760405163295f44f760e21b815260006004820152602481018390526044016104fc565b6009828154811061063e5761063e611839565b90600052602060002001549050919050565b6060600d8054610409906117ff565b60006103f482610875565b60006001600160a01b038216610696576040516322718ad960e21b8152600060048201526024016104fc565b506001600160a01b031660009081526003602052604090205490565b6106ba6108bb565b6106c4600061094d565b565b6060600c8054610409906117ff565b606060018054610409906117ff565b600d80546106f1906117ff565b80601f016020809104026020016040519081016040528092919081815260200182805461071d906117ff565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b505050505081565b6104c033838361099f565b600e80546106f1906117ff565b600c80546106f1906117ff565b6107a28484846104d6565b61056084848484610a3e565b60606103f482610b67565b6107c16108bb565b6107cb8383610c70565b6105e682826108e8565b6060600e8054610409906117ff565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61081a6108bb565b6001600160a01b03811661084457604051631e4fbdf760e01b8152600060048201526024016104fc565b61084d8161094d565b50565b60006001600160e01b0319821663780e9d6360e01b14806103f457506103f482610c8a565b6000818152600260205260408120546001600160a01b0316806103f457604051637e27328960e01b8152600481018490526024016104fc565b6105e68383836001610caf565b600b546001600160a01b031633146106c45760405163118cdaa760e01b81523360048201526024016104fc565b6000828152600660205260409020610900828261189f565b506040518281527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050565b6000610945848484610db5565b949350505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166109d157604051630b61174360e31b81526001600160a01b03831660048201526024016104fc565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b1561056057604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290610a8090339088908790879060040161195f565b6020604051808303816000875af1925050508015610abb575060408051601f3d908101601f19168201909252610ab89181019061199c565b60015b610b24573d808015610ae9576040519150601f19603f3d011682016040523d82523d6000602084013e610aee565b606091505b508051600003610b1c57604051633250574960e11b81526001600160a01b03851660048201526024016104fc565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14610b6057604051633250574960e11b81526001600160a01b03851660048201526024016104fc565b5050505050565b6060610b7282610875565b5060008281526006602052604081208054610b8c906117ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb8906117ff565b8015610c055780601f10610bda57610100808354040283529160200191610c05565b820191906000526020600020905b815481529060010190602001808311610be857829003601f168201915b505050505090506000610c2360408051602081019091526000815290565b90508051600003610c35575092915050565b815115610c67578082604051602001610c4f9291906119b9565b60405160208183030381529060405292505050919050565b61094584610e82565b6104c0828260405180602001604052806000815250610ef7565b60006001600160e01b03198216632483248360e11b14806103f457506103f482610f0e565b8080610cc357506001600160a01b03821615155b15610d85576000610cd384610875565b90506001600160a01b03831615801590610cff5750826001600160a01b0316816001600160a01b031614155b8015610d125750610d1081846107e4565b155b15610d3b5760405163a9fbf51f60e01b81526001600160a01b03841660048201526024016104fc565b8115610d835783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b600080610dc3858585610f5e565b90506001600160a01b038116610e2057610e1b84600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b610e43565b846001600160a01b0316816001600160a01b031614610e4357610e438185611057565b6001600160a01b038516610e5f57610e5a846110e8565b610945565b846001600160a01b0316816001600160a01b031614610945576109458585611197565b6060610e8d82610875565b506000610ea560408051602081019091526000815290565b90506000815111610ec55760405180602001604052806000815250610ef0565b80610ecf846111e7565b604051602001610ee09291906119b9565b6040516020818303038152906040525b9392505050565b610f01838361127a565b6105e66000848484610a3e565b60006001600160e01b031982166380ac58cd60e01b1480610f3f57506001600160e01b03198216635b5e139f60e01b145b806103f457506301ffc9a760e01b6001600160e01b03198316146103f4565b6000828152600260205260408120546001600160a01b0390811690831615610f8b57610f8b8184866112df565b6001600160a01b03811615610fc957610fa8600085600080610caf565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615610ff8576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b60006110628361066a565b6000838152600860205260409020549091508082146110b5576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906110fa906001906119e8565b6000838152600a60205260408120546009805493945090928490811061112257611122611839565b90600052602060002001549050806009838154811061114357611143611839565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061117b5761117b611a09565b6001900381819060005260206000200160009055905550505050565b600060016111a48461066a565b6111ae91906119e8565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b606060006111f483611343565b600101905060008167ffffffffffffffff81111561121457611214611573565b6040519080825280601f01601f19166020018201604052801561123e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461124857509392505050565b6001600160a01b0382166112a457604051633250574960e11b8152600060048201526024016104fc565b60006112b283836000610938565b90506001600160a01b038116156105e6576040516339e3563760e11b8152600060048201526024016104fc565b6112ea83838361141b565b6105e6576001600160a01b03831661131857604051637e27328960e01b8152600481018290526024016104fc565b60405163177e802f60e01b81526001600160a01b0383166004820152602481018290526044016104fc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106113825772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106113ae576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106113cc57662386f26fc10000830492506010015b6305f5e10083106113e4576305f5e100830492506008015b61271083106113f857612710830492506004015b6064831061140a576064830492506002015b600a83106103f45760010192915050565b60006001600160a01b038316158015906109455750826001600160a01b0316846001600160a01b03161480611455575061145584846107e4565b806109455750506000908152600460205260409020546001600160a01b03908116911614919050565b6001600160e01b03198116811461084d57600080fd5b6000602082840312156114a657600080fd5b8135610ef08161147e565b60005b838110156114cc5781810151838201526020016114b4565b50506000910152565b600081518084526114ed8160208601602086016114b1565b601f01601f19169290920160200192915050565b602081526000610ef060208301846114d5565b60006020828403121561152657600080fd5b5035919050565b80356001600160a01b038116811461154457600080fd5b919050565b6000806040838503121561155c57600080fd5b6115658361152d565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156115a4576115a4611573565b604051601f8501601f19908116603f011681019082821181831017156115cc576115cc611573565b816040528093508581528686860111156115e557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261161057600080fd5b610ef083833560208501611589565b6000806040838503121561163257600080fd5b82359150602083013567ffffffffffffffff81111561165057600080fd5b61165c858286016115ff565b9150509250929050565b60008060006060848603121561167b57600080fd5b6116848461152d565b92506116926020850161152d565b9150604084013590509250925092565b6000602082840312156116b457600080fd5b610ef08261152d565b600080604083850312156116d057600080fd5b6116d98361152d565b9150602083013580151581146116ee57600080fd5b809150509250929050565b6000806000806080858703121561170f57600080fd5b6117188561152d565b93506117266020860161152d565b925060408501359150606085013567ffffffffffffffff81111561174957600080fd5b8501601f8101871361175a57600080fd5b61176987823560208401611589565b91505092959194509250565b60008060006060848603121561178a57600080fd5b6117938461152d565b925060208401359150604084013567ffffffffffffffff8111156117b657600080fd5b6117c2868287016115ff565b9150509250925092565b600080604083850312156117df57600080fd5b6117e88361152d565b91506117f66020840161152d565b90509250929050565b600181811c9082168061181357607f821691505b60208210810361183357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b601f8211156105e6576000816000526020600020601f850160051c810160208610156118785750805b601f850160051c820191505b8181101561189757828155600101611884565b505050505050565b815167ffffffffffffffff8111156118b9576118b9611573565b6118cd816118c784546117ff565b8461184f565b602080601f83116001811461190257600084156118ea5750858301515b600019600386901b1c1916600185901b178555611897565b600085815260208120601f198616915b8281101561193157888601518255948401946001909101908401611912565b508582101561194f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611992908301846114d5565b9695505050505050565b6000602082840312156119ae57600080fd5b8151610ef08161147e565b600083516119cb8184602088016114b1565b8351908301906119df8183602088016114b1565b01949350505050565b818103818111156103f457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea26469706673582212206ff38700c73b602455dbb7964f2d3281f62efc77263f0f3bdb67f5e4ee5d4f3f64736f6c63430008170033a2646970667358221220d058cf8dfb17169ff3320b4ba2cb9665d5f875cda19c5c22351f341d783cad4064736f6c63430008170033" diff --git a/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc b/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc index 7d2451e0..8ba00989 100644 --- a/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc +++ b/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc @@ -10,7 +10,7 @@ import "FlowEVMBridgeAccessor" /// transaction(name: String, provider: Address) { - prepare(signer: auth(Inbox, SaveValue) &Account) { + prepare(signer: auth(BorrowValue, ClaimInboxCapability, SaveValue) &Account) { // Claim the BridgeAccessor Capability let accessorCap = signer.inbox.claim(name, provider: provider) ?? panic("BridgeAccessor Capability not found") @@ -18,11 +18,13 @@ transaction(name: String, provider: Address) { // Ensure the Capability is valid assert(accessorCap.check() == true, message: "Invalid BridgeAccessor Capability") - // Create a Router to store the Capability and set the BridgeAccessor Capability in the Router + // Create a Router to store the Capability and save the Router in storage let router <- accessorCap.borrow()!.createBridgeRouter() - router.setBridgeAccessorCap(accessorCap) - - // Save the Router in storage signer.storage.save(<-router, to: /storage/evmBridgeRouter) + + // Borrow the router from storage and set the BridgeAccessor Capability + let routerRef = signer.storage.borrow(from: /storage/evmBridgeRouter) + ?? panic("BridgeRouter not found in storage") + routerRef.setBridgeAccessor(accessorCap) } } From 0521a63627ea6c2d4c09889e165e385f90dc3845 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:20:38 -0500 Subject: [PATCH 2/7] fix EVM contract --- cadence/contracts/standards/EVM.cdc | 2 +- cadence/tests/test_helpers.cdc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cadence/contracts/standards/EVM.cdc b/cadence/contracts/standards/EVM.cdc index ffdd4922..1130a4c5 100644 --- a/cadence/contracts/standards/EVM.cdc +++ b/cadence/contracts/standards/EVM.cdc @@ -624,7 +624,7 @@ contract EVM { routerType: self.getType(), routerUUID: self.uuid, routerAddress: self.owner?.address ?? panic("Router must have an owner to be identified"), - accessorType: accessor.borrow().getType(), + accessorType: accessor.borrow()!.getType(), accessorUUID: accessor.borrow()!.uuid, accessorAddress: accessor.address ) diff --git a/cadence/tests/test_helpers.cdc b/cadence/tests/test_helpers.cdc index 8824aea4..1c8f1124 100644 --- a/cadence/tests/test_helpers.cdc +++ b/cadence/tests/test_helpers.cdc @@ -2,7 +2,7 @@ /// See the python util `get_code_hex.py` to retrieve the hex-encoded Cadence either with or /// without a separator (`{{CONTRACT_NAME}}` used in templates to "chunk" template code). -access(all) let evmUpdateCode = "696d706f72742043727970746f0a696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030310a696d706f72742046756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030320a696d706f727420466c6f77546f6b656e2066726f6d203078303030303030303030303030303030330a0a61636365737328616c6c290a636f6e74726163742045564d207b0a0a202020202f2f20456e7469746c656d656e747320656e61626c696e672066696e65722d6772616e65642061636365737320636f6e74726f6c206f6e206120436164656e63654f776e65644163636f756e740a2020202061636365737328616c6c2920656e7469746c656d656e742056616c69646174650a2020202061636365737328616c6c2920656e7469746c656d656e742057697468647261770a2020202061636365737328616c6c2920656e7469746c656d656e742043616c6c0a2020202061636365737328616c6c2920656e7469746c656d656e74204465706c6f790a2020202061636365737328616c6c2920656e7469746c656d656e74204f776e65720a2020202061636365737328616c6c2920656e7469746c656d656e74204272696467650a0a2020202061636365737328616c6c290a202020206576656e7420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a205b55496e74383b2032305d290a0a202020202f2f2f20464c4f57546f6b656e734465706f736974656420697320656d6974746564207768656e20464c4f5720746f6b656e7320697320627269646765640a202020202f2f2f20696e746f207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f20464c4f57546f6b656e7357697468647261776e20697320656d6974746564207768656e20464c4f5720746f6b656e732061726520627269646765640a202020202f2f2f206f7574206f66207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f204272696467654163636573736f725570646174656420697320656d6974746564207768656e20746865204272696467654163636573736f72204361706162696c6974790a202020202f2f2f206973207570646174656420696e207468652073746f72656420427269646765526f7574657220616c6f6e672077697468206964656e74696679696e670a202020202f2f2f20696e666f726d6174696f6e2061626f757420626f74682e0a2020202061636365737328616c6c290a202020206576656e74204272696467654163636573736f7255706461746564280a2020202020202020726f75746572547970653a20547970652c0a2020202020202020726f75746572555549443a2055496e7436342c0a2020202020202020726f75746572416464726573733a20416464726573732c0a20202020202020206163636573736f72547970653a20547970652c0a20202020202020206163636573736f72555549443a2055496e7436342c0a20202020202020206163636573736f72416464726573733a20416464726573730a20202020290a0a202020202f2f2f2045564d4164647265737320697320616e2045564d2d636f6d70617469626c6520616464726573730a2020202061636365737328616c6c290a202020207374727563742045564d41646472657373207b0a0a20202020202020202f2f2f204279746573206f662074686520616464726573730a202020202020202061636365737328616c6c290a20202020202020206c65742062797465733a205b55496e74383b2032305d0a0a20202020202020202f2f2f20436f6e737472756374732061206e65772045564d20616464726573732066726f6d2074686520676976656e206279746520726570726573656e746174696f6e0a20202020202020207669657720696e69742862797465733a205b55496e74383b2032305d29207b0a20202020202020202020202073656c662e6279746573203d2062797465730a20202020202020207d0a0a20202020202020202f2f2f2042616c616e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a2020202020202020202020206c65742062616c616e6365203d20496e7465726e616c45564d2e62616c616e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020202020202072657475726e2042616c616e6365286174746f666c6f773a2062616c616e6365290a20202020202020207d0a0a20202020202020202f2f2f204e6f6e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206e6f6e636528293a2055496e743634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e6e6f6e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f6465206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f646528293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f6465280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f646548617368206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f64654861736828293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f646548617368280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f207468652045564d206163636f756e7420776974682074686520676976656e20616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a2020202020202020202020206c657420616d6f756e74203d2066726f6d2e62616c616e63650a202020202020202020202020696620616d6f756e74203d3d20302e30207b0a2020202020202020202020202020202070616e6963282263616c6c696e67206465706f7369742066756e6374696f6e207769746820616e20656d707479207661756c74206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a202020202020202020202020496e7465726e616c45564d2e6465706f736974280a2020202020202020202020202020202066726f6d3a203c2d66726f6d2c0a20202020202020202020202020202020746f3a2073656c662e62797465730a202020202020202020202020290a202020202020202020202020656d697420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a2073656c662e62797465732c20616d6f756e743a20616d6f756e74290a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207374727563742042616c616e6365207b0a0a20202020202020202f2f2f205468652062616c616e636520696e206174746f2d464c4f570a20202020202020202f2f2f204174746f2d464c4f572069732074686520736d616c6c6573742064656e6f6d696e6174696f6e206f6620464c4f5720283165313820464c4f57290a20202020202020202f2f2f2074686174206973207573656420746f2073746f7265206163636f756e742062616c616e63657320696e736964652045564d0a20202020202020202f2f2f2073696d696c617220746f207468652077617920574549206973207573656420746f2073746f72652045544820646976697369626c6520746f20313820646563696d616c20706c616365732e0a202020202020202061636365737328616c6c290a2020202020202020766172206174746f666c6f773a2055496e740a0a20202020202020202f2f2f20436f6e737472756374732061206e65772062616c616e63650a202020202020202061636365737328616c6c290a20202020202020207669657720696e6974286174746f666c6f773a2055496e7429207b0a20202020202020202020202073656c662e6174746f666c6f77203d206174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2053657473207468652062616c616e636520627920612055466978363420283820646563696d616c20706f696e7473292c2074686520666f726d61740a20202020202020202f2f2f2074686174206973207573656420696e20436164656e636520746f2073746f726520464c4f5720746f6b656e732e0a202020202020202061636365737328616c6c290a202020202020202066756e20736574464c4f5728666c6f773a20554669783634297b0a20202020202020202020202073656c662e6174746f666c6f77203d20496e7465726e616c45564d2e63617374546f4174746f464c4f572862616c616e63653a20666c6f77290a20202020202020207d0a0a20202020202020202f2f2f204361737473207468652062616c616e636520746f2061205546697836342028726f756e64696e6720646f776e290a20202020202020202f2f2f205761726e696e67212063617374696e6720612062616c616e636520746f20612055466978363420776869636820737570706f7274732061206c6f776572206c6576656c206f6620707265636973696f6e0a20202020202020202f2f2f20283820646563696d616c20706f696e747320696e20636f6d7061726520746f20313829206d6967687420726573756c7420696e20726f756e64696e6720646f776e206572726f722e0a20202020202020202f2f2f205573652074686520746f4174746f466c6f772066756e6374696f6e20696620796f752063617265206e656564206d6f72652061636375726163792e0a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e464c4f5728293a20554669783634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63617374546f464c4f572862616c616e63653a2073656c662e6174746f666c6f77290a20202020202020207d0a0a20202020202020202f2f2f2052657475726e73207468652062616c616e636520696e204174746f2d464c4f570a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e4174746f464c4f5728293a2055496e74207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074727565206966207468652062616c616e6365206973207a65726f0a202020202020202061636365737328616c6c290a202020202020202066756e2069735a65726f28293a20426f6f6c207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f77203d3d20300a20202020202020207d0a202020207d0a0a202020202f2f2f207265706f7274732074686520737461747573206f662065766d20657865637574696f6e2e0a2020202061636365737328616c6c2920656e756d205374617475733a2055496e7438207b0a20202020202020202f2f2f2069732028726172656c79292072657475726e6564207768656e2073746174757320697320756e6b6e6f776e0a20202020202020202f2f2f20616e6420736f6d657468696e672068617320676f6e6520766572792077726f6e672e0a202020202020202061636365737328616c6c29206361736520756e6b6e6f776e0a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206661696c6564206174207468652076616c69646174696f6e20737465702028652e672e206e6f6e6365206d69736d61746368292e0a20202020202020202f2f2f20416e20696e76616c6964207472616e73616374696f6e2f63616c6c2069732072656a656374656420746f2062652065786563757465640a20202020202020202f2f2f206f7220626520696e636c7564656420696e206120626c6f636b2e0a202020202020202061636365737328616c6c29206361736520696e76616c69640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c206275742074686520766d20686173207265706f7274656420616e206572726f722061730a20202020202020202f2f2f20746865206f7574636f6d65206f6620657865637574696f6e2028652e672e2072756e6e696e67206f7574206f6620676173292e0a20202020202020202f2f2f2041206661696c65642074782f63616c6c20697320696e636c7564656420696e206120626c6f636b2e0a20202020202020202f2f2f204e6f746520746861742072657375626d697373696f6e206f662061206661696c6564207472616e73616374696f6e20776f756c640a20202020202020202f2f2f20726573756c7420696e20696e76616c69642073746174757320696e20746865207365636f6e6420617474656d70742c20676976656e0a20202020202020202f2f2f20746865206e6f6e636520776f756c6420626520636f6d6520696e76616c69642e0a202020202020202061636365737328616c6c292063617365206661696c65640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c20616e64206e6f206572726f72206973207265706f727465642062792074686520766d2e0a202020202020202061636365737328616c6c292063617365207375636365737366756c0a202020207d0a0a202020202f2f2f207265706f72747320746865206f7574636f6d65206f662065766d207472616e73616374696f6e2f63616c6c20657865637574696f6e20617474656d70740a2020202061636365737328616c6c292073747275637420526573756c74207b0a20202020202020202f2f2f20737461747573206f662074686520657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c6574207374617475733a205374617475730a0a20202020202020202f2f2f206572726f7220636f646520286572726f7220636f6465207a65726f206d65616e73206e6f206572726f72290a202020202020202061636365737328616c6c290a20202020202020206c6574206572726f72436f64653a2055496e7436340a0a20202020202020202f2f2f2072657475726e732074686520616d6f756e74206f6620676173206d65746572656420647572696e670a20202020202020202f2f2f2065766d20657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c657420676173557365643a2055496e7436340a0a20202020202020202f2f2f2072657475726e7320746865206461746120746861742069732072657475726e65642066726f6d0a20202020202020202f2f2f207468652065766d20666f72207468652063616c6c2e20466f7220636f612e6465706c6f790a20202020202020202f2f2f2063616c6c732069742072657475726e73207468652061646472657373206279746573206f66207468650a20202020202020202f2f2f206e65776c79206465706c6f79656420636f6e74726163742e0a202020202020202061636365737328616c6c290a20202020202020206c657420646174613a205b55496e74385d0a0a2020202020202020696e6974280a2020202020202020202020207374617475733a205374617475732c0a2020202020202020202020206572726f72436f64653a2055496e7436342c0a202020202020202020202020676173557365643a2055496e7436342c0a202020202020202020202020646174613a205b55496e74385d0a202020202020202029207b0a20202020202020202020202073656c662e737461747573203d207374617475730a20202020202020202020202073656c662e6572726f72436f6465203d206572726f72436f64650a20202020202020202020202073656c662e67617355736564203d20676173557365640a20202020202020202020202073656c662e64617461203d20646174610a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204164647265737361626c65207b0a20202020202020202f2f2f205468652045564d20616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d416464726573730a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520436164656e63654f776e65644163636f756e743a204164647265737361626c65207b0a0a20202020202020206163636573732873656c66290a2020202020202020766172206164647265737342797465733a205b55496e74383b2032305d0a0a2020202020202020696e69742829207b0a2020202020202020202020202f2f206164647265737320697320696e697469616c6c792073657420746f207a65726f0a2020202020202020202020202f2f206275742075706461746564207468726f75676820696e697441646472657373206c617465720a2020202020202020202020202f2f207765206861766520746f20646f20746869732073696e6365207765206e656564207265736f75726365206964202875756964290a2020202020202020202020202f2f20746f2063616c63756c617465207468652045564d206164647265737320666f72207468697320636164656e6365206f776e6564206163636f756e740a20202020202020202020202073656c662e616464726573734279746573203d205b302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20305d0a20202020202020207d0a0a202020202020202061636365737328636f6e7472616374290a202020202020202066756e20696e697441646472657373286164647265737342797465733a205b55496e74383b2032305d29207b0a20202020202020202020202f2f206f6e6c7920616c6c6f7720736574206164647265737320666f72207468652066697273742074696d650a20202020202020202020202f2f20636865636b206164647265737320697320656d7074790a202020202020202020202020666f72206974656d20696e2073656c662e616464726573734279746573207b0a20202020202020202020202020202020617373657274286974656d203d3d20302c206d6573736167653a2022616464726573732062797465206973206e6f7420656d70747922290a2020202020202020202020207d0a202020202020202020202073656c662e616464726573734279746573203d206164647265737342797465730a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d41646472657373207b0a2020202020202020202020202f2f20416c77617973206372656174652061206e65772045564d4164647265737320696e7374616e63650a20202020202020202020202072657475726e2045564d416464726573732862797465733a2073656c662e616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f204765742062616c616e6365206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a20202020202020202020202072657475726e2073656c662e6164647265737328292e62616c616e636528290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a20202020202020202020202073656c662e6164647265737328292e6465706f7369742866726f6d3a203c2d66726f6d290a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e7420626568696e6420616e20656e7469746c656d656e742c20616374696e672061732070726f6f66206f66206163636573730a2020202020202020616363657373284f776e6572207c2056616c6964617465290a2020202020202020766965772066756e2070726f7465637465644164647265737328293a2045564d41646472657373207b0a20202020202020202020202072657475726e2073656c662e6164647265737328290a20202020202020207d0a0a20202020202020202f2f2f20576974686472617773207468652062616c616e63652066726f6d2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a20202020202020202f2f2f204e6f7465207468617420616d6f756e747320736d616c6c6572207468616e2031306e4620283130652d38292063616e27742062652077697468647261776e0a20202020202020202f2f2f20676976656e207468617420466c6f7720546f6b656e205661756c747320757365205546697836347320746f2073746f72652062616c616e6365732e0a20202020202020202f2f2f2049662074686520676976656e2062616c616e636520636f6e76657273696f6e20746f2055466978363420726573756c747320696e0a20202020202020202f2f2f20726f756e64696e67206572726f722c20746869732066756e6374696f6e20776f756c64206661696c2e0a2020202020202020616363657373284f776e6572207c205769746864726177290a202020202020202066756e2077697468647261772862616c616e63653a2042616c616e6365293a2040466c6f77546f6b656e2e5661756c74207b0a20202020202020202020202069662062616c616e63652e69735a65726f2829207b0a2020202020202020202020202020202070616e6963282263616c6c696e672077697468647261772066756e6374696f6e2077697468207a65726f2062616c616e6365206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a2020202020202020202020206c6574207661756c74203c2d20496e7465726e616c45564d2e7769746864726177280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020616d6f756e743a2062616c616e63652e6174746f666c6f770a20202020202020202020202029206173212040466c6f77546f6b656e2e5661756c740a202020202020202020202020656d697420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a2073656c662e6164647265737342797465732c20616d6f756e743a2062616c616e63652e696e464c4f572829290a20202020202020202020202072657475726e203c2d7661756c740a20202020202020207d0a0a20202020202020202f2f2f204465706c6f7973206120636f6e747261637420746f207468652045564d20656e7669726f6e6d656e742e0a20202020202020202f2f2f2052657475726e73207468652061646472657373206f6620746865206e65776c79206465706c6f79656420636f6e74726163740a2020202020202020616363657373284f776e6572207c204465706c6f79290a202020202020202066756e206465706c6f79280a202020202020202020202020636f64653a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a2045564d41646472657373207b0a2020202020202020202020206c657420616464726573734279746573203d20496e7465726e616c45564d2e6465706c6f79280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020636f64653a20636f64652c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020290a20202020202020202020202072657475726e2045564d416464726573732862797465733a20616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f2043616c6c7320612066756e6374696f6e20776974682074686520676976656e20646174612e0a20202020202020202f2f2f2054686520657865637574696f6e206973206c696d697465642062792074686520676976656e20616d6f756e74206f66206761730a2020202020202020616363657373284f776e6572207c2043616c6c290a202020202020202066756e2063616c6c280a202020202020202020202020746f3a2045564d416464726573732c0a202020202020202020202020646174613a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a20526573756c74207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63616c6c280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020746f3a20746f2e62797465732c0a20202020202020202020202020202020646174613a20646174612c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020292061732120526573756c740a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e465420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f7369744e4654286e66743a203c2d6e66742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e46542066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e2074686520726571756573746564204e465420696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e2077697468647261774e4654280a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e77697468647261774e4654280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a2020202020202020202020202020202069643a2069642c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e205661756c7420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f736974546f6b656e73287661756c743a203c2d7661756c742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e2066756e6769626c6520746f6b656e732066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720610a20202020202020202f2f2f2066656520746f2066756c66696c6c207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e207468652072657175657374656420746f6b656e7320262073756666696369656e742062616c616e6365206f660a20202020202020202f2f2f2072657175657374656420746f6b656e7320696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e207769746864726177546f6b656e73280a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e7769746864726177546f6b656e73280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a20202020202020202020202020202020616d6f756e743a20616d6f756e742c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a202020207d0a0a202020202f2f2f20437265617465732061206e657720636164656e6365206f776e6564206163636f756e740a2020202061636365737328616c6c290a2020202066756e20637265617465436164656e63654f776e65644163636f756e7428293a2040436164656e63654f776e65644163636f756e74207b0a20202020202020206c657420616363203c2d63726561746520436164656e63654f776e65644163636f756e7428290a20202020202020206c65742061646472203d20496e7465726e616c45564d2e637265617465436164656e63654f776e65644163636f756e7428757569643a206163632e75756964290a20202020202020206163632e696e697441646472657373286164647265737342797465733a2061646472290a2020202020202020656d697420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a2061646472290a202020202020202072657475726e203c2d6163630a202020207d0a0a202020202f2f2f2052756e7320616e206120524c502d656e636f6465642045564d207472616e73616374696f6e2c2064656475637473207468652067617320666565732c0a202020202f2f2f20616e64206465706f736974732074686520676173206665657320696e746f207468652070726f766964656420636f696e6261736520616464726573732e0a2020202061636365737328616c6c290a2020202066756e2072756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a202020202020202072657475726e20496e7465726e616c45564d2e72756e280a2020202020202020202020202020202074783a2074782c0a20202020202020202020202020202020636f696e626173653a20636f696e626173652e62797465730a2020202020202020292061732120526573756c740a202020207d0a0a202020202f2f2f206d75737452756e2072756e7320746865207472616e73616374696f6e207573696e672045564d2e72756e207965742069740a202020202f2f2f20726f6c6c6261636b2069662074686520747820657865637574696f6e2073746174757320697320756e6b6e6f776e206f7220696e76616c69642e0a202020202f2f2f204e6f746520746861742074686973206d6574686f6420646f6573206e6f7420726f6c6c6261636b206966207472616e73616374696f6e0a202020202f2f2f2069732065786563757465642062757420616e20766d206572726f72206973207265706f7274656420617320746865206f7574636f6d650a202020202f2f2f206f662074686520657865637574696f6e20287374617475733a206661696c6564292e0a2020202061636365737328616c6c290a2020202066756e206d75737452756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a20202020202020206c65742072756e526573756c74203d2073656c662e72756e2874783a2074782c20636f696e626173653a20636f696e62617365290a2020202020202020617373657274280a20202020202020202020202072756e526573756c742e737461747573203d3d205374617475732e6661696c6564207c7c2072756e526573756c742e737461747573203d3d205374617475732e7375636365737366756c2c0a2020202020202020202020206d6573736167653a20227478206973206e6f742076616c696420666f7220657865637574696f6e220a2020202020202020290a202020202020202072657475726e2072756e526573756c740a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249285f2076616c7565733a205b416e795374727563745d293a205b55496e74385d207b0a202020202020202072657475726e20496e7465726e616c45564d2e656e636f64654142492876616c756573290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f64654142492874797065733a205b547970655d2c20646174613a205b55496e74385d293a205b416e795374727563745d207b0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a20202020202020205f2076616c7565733a205b416e795374727563745d0a20202020293a205b55496e74385d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a20202020202020206c657420617267756d656e7473203d20496e7465726e616c45564d2e656e636f64654142492876616c756573290a0a202020202020202072657475726e206d6574686f6449442e636f6e63617428617267756d656e7473290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a202020202020202074797065733a205b547970655d2c0a2020202020202020646174613a205b55496e74385d0a20202020293a205b416e795374727563745d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a0a2020202020202020666f72206279746520696e206d6574686f644944207b0a2020202020202020202020206966206279746520213d20646174612e72656d6f766546697273742829207b0a2020202020202020202020202020202070616e696328227369676e6174757265206d69736d6174636822290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a202020202f2f2f2056616c69646174696f6e526573756c742072657475726e732074686520726573756c74206f6620434f41206f776e6572736869702070726f6f662076616c69646174696f6e0a2020202061636365737328616c6c290a202020207374727563742056616c69646174696f6e526573756c74207b0a202020202020202061636365737328616c6c290a20202020202020206c657420697356616c69643a20426f6f6c0a0a202020202020202061636365737328616c6c290a20202020202020206c65742070726f626c656d3a20537472696e673f0a0a2020202020202020696e697428697356616c69643a20426f6f6c2c2070726f626c656d3a20537472696e673f29207b0a20202020202020202020202073656c662e697356616c6964203d20697356616c69640a20202020202020202020202073656c662e70726f626c656d203d2070726f626c656d0a20202020202020207d0a202020207d0a0a202020202f2f2f2076616c6964617465434f414f776e65727368697050726f6f662076616c696461746573206120434f41206f776e6572736869702070726f6f660a2020202061636365737328616c6c290a2020202066756e2076616c6964617465434f414f776e65727368697050726f6f66280a2020202020202020616464726573733a20416464726573732c0a2020202020202020706174683a205075626c6963506174682c0a20202020202020207369676e6564446174613a205b55496e74385d2c0a20202020202020206b6579496e64696365733a205b55496e7436345d2c0a20202020202020207369676e6174757265733a205b5b55496e74385d5d2c0a202020202020202065766d416464726573733a205b55496e74383b2032305d0a20202020293a2056616c69646174696f6e526573756c74207b0a0a20202020202020202f2f206d616b65207369676e6174757265207365742066697273740a20202020202020202f2f20636865636b206e756d626572206f66207369676e617475726573206d617463686573206e756d626572206f66206b657920696e64696365730a20202020202020206966206b6579496e64696365732e6c656e67746820213d207369676e6174757265732e6c656e677468207b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a20226b657920696e64696365732073697a6520646f65736e2774206d6174636820746865207369676e617475726573220a202020202020202020202020290a20202020202020207d0a0a2020202020202020766172207369676e61747572655365743a205b43727970746f2e4b65794c6973745369676e61747572655d203d205b5d0a2020202020202020666f72207369676e6174757265496e6465782c207369676e617475726520696e207369676e6174757265737b0a2020202020202020202020207369676e61747572655365742e617070656e642843727970746f2e4b65794c6973745369676e6174757265280a202020202020202020202020202020206b6579496e6465783a20496e74286b6579496e64696365735b7369676e6174757265496e6465785d292c0a202020202020202020202020202020207369676e61747572653a207369676e61747572650a20202020202020202020202029290a20202020202020207d0a0a20202020202020202f2f206665746368206163636f756e740a20202020202020206c657420616363203d206765744163636f756e742861646472657373290a0a20202020202020202f2f20636f6e737472756374696e67206b6579206c6973740a20202020202020206c6574206b65794c697374203d2043727970746f2e4b65794c69737428290a2020202020202020666f72207369676e617475726520696e207369676e6174757265536574207b0a2020202020202020202020206c6574206b6579203d206163632e6b6579732e676574286b6579496e6465783a207369676e61747572652e6b6579496e64657829210a20202020202020202020202061737365727428216b65792e69735265766f6b65642c206d6573736167653a20227265766f6b6564206b6579206973207573656422290a2020202020202020202020206b65794c6973742e616464280a20202020202020202020202020206b65792e7075626c69634b65792c0a202020202020202020202020202068617368416c676f726974686d3a206b65792e68617368416c676f726974686d2c0a20202020202020202020202020207765696768743a206b65792e7765696768742c0a2020202020202020202020290a20202020202020207d0a0a20202020202020206c657420697356616c6964203d206b65794c6973742e766572696679280a2020202020202020202020207369676e61747572655365743a207369676e61747572655365742c0a2020202020202020202020207369676e6564446174613a207369676e6564446174612c0a202020202020202020202020646f6d61696e53657061726174696f6e5461673a2022464c4f572d56302e302d75736572220a2020202020202020290a0a202020202020202069662021697356616c69647b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a202274686520676976656e207369676e61747572657320617265206e6f742076616c6964206f722070726f7669646520656e6f75676820776569676874220a202020202020202020202020290a20202020202020207d0a0a20202020202020206c657420636f61526566203d206163632e6361706162696c69746965732e626f72726f773c2645564d2e436164656e63654f776e65644163636f756e743e2870617468290a2020202020202020696620636f61526566203d3d206e696c207b0a2020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202070726f626c656d3a2022636f756c64206e6f7420626f72726f7720627269646765206163636f756e742773207265736f75726365220a20202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f207665726966792065766d2061646472657373206d61746368696e670a20202020202020207661722061646472203d20636f61526566212e6164647265737328290a2020202020202020666f7220696e6465782c206974656d20696e20636f61526566212e6164647265737328292e6279746573207b0a2020202020202020202020206966206974656d20213d2065766d416464726573735b696e6465785d207b0a2020202020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202020202070726f626c656d3a202265766d2061646472657373206d69736d61746368220a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e2056616c69646174696f6e526573756c74280a202020202020202020202020697356616c69643a20747275652c0a20202020202020202020202070726f626c656d3a206e696c0a2020202020202020290a202020207d0a0a202020202f2f2f20426c6f636b2072657475726e7320696e666f726d6174696f6e2061626f757420746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a202020207374727563742045564d426c6f636b207b0a202020202020202061636365737328616c6c290a20202020202020206c6574206865696768743a2055496e7436340a0a202020202020202061636365737328616c6c290a20202020202020206c657420686173683a20537472696e670a0a202020202020202061636365737328616c6c290a20202020202020206c657420746f74616c537570706c793a20496e740a0a2020202020202020696e6974286865696768743a2055496e7436342c20686173683a20537472696e672c20746f74616c537570706c793a20496e7429207b0a20202020202020202020202073656c662e686569676874203d206865696768740a20202020202020202020202073656c662e68617368203d20686173680a20202020202020202020202073656c662e746f74616c537570706c79203d20746f74616c537570706c790a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e7320746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a2020202066756e206765744c6174657374426c6f636b28293a2045564d426c6f636b207b0a202020202020202072657475726e20496e7465726e616c45564d2e6765744c6174657374426c6f636b2829206173212045564d426c6f636b0a202020207d0a0a202020202f2f2f20496e7465726661636520666f722061207265736f75726365207768696368206163747320617320616e20656e747279706f696e7420746f2074686520564d206272696467650a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204272696467654163636573736f72207b0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e465420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e46542066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e2077697468647261774e4654280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620612066756e6769626c6520746f6b656e207661756c7420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f662066756e6769626c6520746f6b656e732066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e207769746864726177546f6b656e73280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d0a202020207d0a0a202020202f2f2f20496e746572666163652077686963682063617074757265732061204361706162696c69747920746f2074686520627269646765204163636573736f722c20736176696e672069742077697468696e2074686520427269646765526f75746572207265736f757263650a2020202061636365737328616c6c290a202020207265736f7572636520696e7465726661636520427269646765526f75746572207b0a0a20202020202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a2020202020202020616363657373284272696467652920766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d0a0a20202020202020202f2f2f205365747320746865204272696467654163636573736f72204361706162696c69747920696e2074686520427269646765526f757465720a202020202020202061636365737328427269646765292066756e207365744272696467654163636573736f72285f206163636573736f723a204361706162696c6974793c61757468284272696467652920267b4272696467654163636573736f727d3e29207b0a202020202020202020202020707265207b0a202020202020202020202020202020206163636573736f722e636865636b28293a2022496e76616c6964204272696467654163636573736f72204361706162696c6974792070726f7669646564220a20202020202020202020202020202020656d6974204272696467654163636573736f7255706461746564280a2020202020202020202020202020202020202020726f75746572547970653a2073656c662e6765745479706528292c0a2020202020202020202020202020202020202020726f75746572555549443a2073656c662e757569642c0a2020202020202020202020202020202020202020726f75746572416464726573733a2073656c662e6f776e65723f2e61646472657373203f3f2070616e69632822526f75746572206d757374206861766520616e206f776e657220746f206265206964656e74696669656422292c0a20202020202020202020202020202020202020206163636573736f72547970653a206163636573736f722e626f72726f7728292e6765745479706528292c0a20202020202020202020202020202020202020206163636573736f72555549443a206163636573736f722e626f72726f772829212e757569642c0a20202020202020202020202020202020202020206163636573736f72416464726573733a206163636573736f722e616464726573730a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a202020206163636573732873656c66290a20202020766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d207b0a202020202020202072657475726e2073656c662e6163636f756e742e73746f726167652e626f72726f773c61757468284272696467652920267b427269646765526f757465727d3e2866726f6d3a202f73746f726167652f65766d427269646765526f75746572290a2020202020202020202020203f2e626f72726f774272696467654163636573736f7228290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f207468652045564d2062726964676522290a202020207d0a7d0a" +access(all) let evmUpdateCode = "696d706f72742043727970746f0a696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030310a696d706f72742046756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030320a696d706f727420466c6f77546f6b656e2066726f6d203078303030303030303030303030303030330a0a61636365737328616c6c290a636f6e74726163742045564d207b0a0a202020202f2f20456e7469746c656d656e747320656e61626c696e672066696e65722d6772616e65642061636365737320636f6e74726f6c206f6e206120436164656e63654f776e65644163636f756e740a2020202061636365737328616c6c2920656e7469746c656d656e742056616c69646174650a2020202061636365737328616c6c2920656e7469746c656d656e742057697468647261770a2020202061636365737328616c6c2920656e7469746c656d656e742043616c6c0a2020202061636365737328616c6c2920656e7469746c656d656e74204465706c6f790a2020202061636365737328616c6c2920656e7469746c656d656e74204f776e65720a2020202061636365737328616c6c2920656e7469746c656d656e74204272696467650a0a2020202061636365737328616c6c290a202020206576656e7420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a205b55496e74383b2032305d290a0a202020202f2f2f20464c4f57546f6b656e734465706f736974656420697320656d6974746564207768656e20464c4f5720746f6b656e7320697320627269646765640a202020202f2f2f20696e746f207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f20464c4f57546f6b656e7357697468647261776e20697320656d6974746564207768656e20464c4f5720746f6b656e732061726520627269646765640a202020202f2f2f206f7574206f66207468652045564d20656e7669726f6e6d656e742e204e6f746520746861742074686973206576656e74206973206e6f7420656d69747465640a202020202f2f2f20666f72207472616e73666572206f6620666c6f7720746f6b656e73206265747765656e2074776f2045564d206164647265737365732e0a2020202061636365737328616c6c290a202020206576656e7420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a205b55496e74383b2032305d2c20616d6f756e743a20554669783634290a0a202020202f2f2f204272696467654163636573736f725570646174656420697320656d6974746564207768656e20746865204272696467654163636573736f72204361706162696c6974790a202020202f2f2f206973207570646174656420696e207468652073746f72656420427269646765526f7574657220616c6f6e672077697468206964656e74696679696e670a202020202f2f2f20696e666f726d6174696f6e2061626f757420626f74682e0a2020202061636365737328616c6c290a202020206576656e74204272696467654163636573736f7255706461746564280a2020202020202020726f75746572547970653a20547970652c0a2020202020202020726f75746572555549443a2055496e7436342c0a2020202020202020726f75746572416464726573733a20416464726573732c0a20202020202020206163636573736f72547970653a20547970652c0a20202020202020206163636573736f72555549443a2055496e7436342c0a20202020202020206163636573736f72416464726573733a20416464726573730a20202020290a0a202020202f2f2f2045564d4164647265737320697320616e2045564d2d636f6d70617469626c6520616464726573730a2020202061636365737328616c6c290a202020207374727563742045564d41646472657373207b0a0a20202020202020202f2f2f204279746573206f662074686520616464726573730a202020202020202061636365737328616c6c290a20202020202020206c65742062797465733a205b55496e74383b2032305d0a0a20202020202020202f2f2f20436f6e737472756374732061206e65772045564d20616464726573732066726f6d2074686520676976656e206279746520726570726573656e746174696f6e0a20202020202020207669657720696e69742862797465733a205b55496e74383b2032305d29207b0a20202020202020202020202073656c662e6279746573203d2062797465730a20202020202020207d0a0a20202020202020202f2f2f2042616c616e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a2020202020202020202020206c65742062616c616e6365203d20496e7465726e616c45564d2e62616c616e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020202020202072657475726e2042616c616e6365286174746f666c6f773a2062616c616e6365290a20202020202020207d0a0a20202020202020202f2f2f204e6f6e6365206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206e6f6e636528293a2055496e743634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e6e6f6e6365280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f6465206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f646528293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f6465280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20436f646548617368206f662074686520616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e20636f64654861736828293a205b55496e74385d207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e636f646548617368280a20202020202020202020202020202020616464726573733a2073656c662e62797465730a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f207468652045564d206163636f756e7420776974682074686520676976656e20616464726573730a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a2020202020202020202020206c657420616d6f756e74203d2066726f6d2e62616c616e63650a202020202020202020202020696620616d6f756e74203d3d20302e30207b0a2020202020202020202020202020202070616e6963282263616c6c696e67206465706f7369742066756e6374696f6e207769746820616e20656d707479207661756c74206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a202020202020202020202020496e7465726e616c45564d2e6465706f736974280a2020202020202020202020202020202066726f6d3a203c2d66726f6d2c0a20202020202020202020202020202020746f3a2073656c662e62797465730a202020202020202020202020290a202020202020202020202020656d697420464c4f57546f6b656e734465706f7369746564286164647265737342797465733a2073656c662e62797465732c20616d6f756e743a20616d6f756e74290a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207374727563742042616c616e6365207b0a0a20202020202020202f2f2f205468652062616c616e636520696e206174746f2d464c4f570a20202020202020202f2f2f204174746f2d464c4f572069732074686520736d616c6c6573742064656e6f6d696e6174696f6e206f6620464c4f5720283165313820464c4f57290a20202020202020202f2f2f2074686174206973207573656420746f2073746f7265206163636f756e742062616c616e63657320696e736964652045564d0a20202020202020202f2f2f2073696d696c617220746f207468652077617920574549206973207573656420746f2073746f72652045544820646976697369626c6520746f20313820646563696d616c20706c616365732e0a202020202020202061636365737328616c6c290a2020202020202020766172206174746f666c6f773a2055496e740a0a20202020202020202f2f2f20436f6e737472756374732061206e65772062616c616e63650a202020202020202061636365737328616c6c290a20202020202020207669657720696e6974286174746f666c6f773a2055496e7429207b0a20202020202020202020202073656c662e6174746f666c6f77203d206174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2053657473207468652062616c616e636520627920612055466978363420283820646563696d616c20706f696e7473292c2074686520666f726d61740a20202020202020202f2f2f2074686174206973207573656420696e20436164656e636520746f2073746f726520464c4f5720746f6b656e732e0a202020202020202061636365737328616c6c290a202020202020202066756e20736574464c4f5728666c6f773a20554669783634297b0a20202020202020202020202073656c662e6174746f666c6f77203d20496e7465726e616c45564d2e63617374546f4174746f464c4f572862616c616e63653a20666c6f77290a20202020202020207d0a0a20202020202020202f2f2f204361737473207468652062616c616e636520746f2061205546697836342028726f756e64696e6720646f776e290a20202020202020202f2f2f205761726e696e67212063617374696e6720612062616c616e636520746f20612055466978363420776869636820737570706f7274732061206c6f776572206c6576656c206f6620707265636973696f6e0a20202020202020202f2f2f20283820646563696d616c20706f696e747320696e20636f6d7061726520746f20313829206d6967687420726573756c7420696e20726f756e64696e6720646f776e206572726f722e0a20202020202020202f2f2f205573652074686520746f4174746f466c6f772066756e6374696f6e20696620796f752063617265206e656564206d6f72652061636375726163792e0a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e464c4f5728293a20554669783634207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63617374546f464c4f572862616c616e63653a2073656c662e6174746f666c6f77290a20202020202020207d0a0a20202020202020202f2f2f2052657475726e73207468652062616c616e636520696e204174746f2d464c4f570a202020202020202061636365737328616c6c290a2020202020202020766965772066756e20696e4174746f464c4f5728293a2055496e74207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f770a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074727565206966207468652062616c616e6365206973207a65726f0a202020202020202061636365737328616c6c290a202020202020202066756e2069735a65726f28293a20426f6f6c207b0a20202020202020202020202072657475726e2073656c662e6174746f666c6f77203d3d20300a20202020202020207d0a202020207d0a0a202020202f2f2f207265706f7274732074686520737461747573206f662065766d20657865637574696f6e2e0a2020202061636365737328616c6c2920656e756d205374617475733a2055496e7438207b0a20202020202020202f2f2f2069732028726172656c79292072657475726e6564207768656e2073746174757320697320756e6b6e6f776e0a20202020202020202f2f2f20616e6420736f6d657468696e672068617320676f6e6520766572792077726f6e672e0a202020202020202061636365737328616c6c29206361736520756e6b6e6f776e0a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206661696c6564206174207468652076616c69646174696f6e20737465702028652e672e206e6f6e6365206d69736d61746368292e0a20202020202020202f2f2f20416e20696e76616c6964207472616e73616374696f6e2f63616c6c2069732072656a656374656420746f2062652065786563757465640a20202020202020202f2f2f206f7220626520696e636c7564656420696e206120626c6f636b2e0a202020202020202061636365737328616c6c29206361736520696e76616c69640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c206275742074686520766d20686173207265706f7274656420616e206572726f722061730a20202020202020202f2f2f20746865206f7574636f6d65206f6620657865637574696f6e2028652e672e2072756e6e696e67206f7574206f6620676173292e0a20202020202020202f2f2f2041206661696c65642074782f63616c6c20697320696e636c7564656420696e206120626c6f636b2e0a20202020202020202f2f2f204e6f746520746861742072657375626d697373696f6e206f662061206661696c6564207472616e73616374696f6e20776f756c640a20202020202020202f2f2f20726573756c7420696e20696e76616c69642073746174757320696e20746865207365636f6e6420617474656d70742c20676976656e0a20202020202020202f2f2f20746865206e6f6e636520776f756c6420626520636f6d6520696e76616c69642e0a202020202020202061636365737328616c6c292063617365206661696c65640a0a20202020202020202f2f2f2069732072657475726e6564207768656e20657865637574696f6e206f6620616e2065766d207472616e73616374696f6e2f63616c6c0a20202020202020202f2f2f20686173206265656e207375636365737366756c20616e64206e6f206572726f72206973207265706f727465642062792074686520766d2e0a202020202020202061636365737328616c6c292063617365207375636365737366756c0a202020207d0a0a202020202f2f2f207265706f72747320746865206f7574636f6d65206f662065766d207472616e73616374696f6e2f63616c6c20657865637574696f6e20617474656d70740a2020202061636365737328616c6c292073747275637420526573756c74207b0a20202020202020202f2f2f20737461747573206f662074686520657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c6574207374617475733a205374617475730a0a20202020202020202f2f2f206572726f7220636f646520286572726f7220636f6465207a65726f206d65616e73206e6f206572726f72290a202020202020202061636365737328616c6c290a20202020202020206c6574206572726f72436f64653a2055496e7436340a0a20202020202020202f2f2f2072657475726e732074686520616d6f756e74206f6620676173206d65746572656420647572696e670a20202020202020202f2f2f2065766d20657865637574696f6e0a202020202020202061636365737328616c6c290a20202020202020206c657420676173557365643a2055496e7436340a0a20202020202020202f2f2f2072657475726e7320746865206461746120746861742069732072657475726e65642066726f6d0a20202020202020202f2f2f207468652065766d20666f72207468652063616c6c2e20466f7220636f612e6465706c6f790a20202020202020202f2f2f2063616c6c732069742072657475726e73207468652061646472657373206279746573206f66207468650a20202020202020202f2f2f206e65776c79206465706c6f79656420636f6e74726163742e0a202020202020202061636365737328616c6c290a20202020202020206c657420646174613a205b55496e74385d0a0a2020202020202020696e6974280a2020202020202020202020207374617475733a205374617475732c0a2020202020202020202020206572726f72436f64653a2055496e7436342c0a202020202020202020202020676173557365643a2055496e7436342c0a202020202020202020202020646174613a205b55496e74385d0a202020202020202029207b0a20202020202020202020202073656c662e737461747573203d207374617475730a20202020202020202020202073656c662e6572726f72436f6465203d206572726f72436f64650a20202020202020202020202073656c662e67617355736564203d20676173557365640a20202020202020202020202073656c662e64617461203d20646174610a20202020202020207d0a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204164647265737361626c65207b0a20202020202020202f2f2f205468652045564d20616464726573730a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d416464726573730a202020207d0a0a2020202061636365737328616c6c290a202020207265736f7572636520436164656e63654f776e65644163636f756e743a204164647265737361626c65207b0a0a20202020202020206163636573732873656c66290a2020202020202020766172206164647265737342797465733a205b55496e74383b2032305d0a0a2020202020202020696e69742829207b0a2020202020202020202020202f2f206164647265737320697320696e697469616c6c792073657420746f207a65726f0a2020202020202020202020202f2f206275742075706461746564207468726f75676820696e697441646472657373206c617465720a2020202020202020202020202f2f207765206861766520746f20646f20746869732073696e6365207765206e656564207265736f75726365206964202875756964290a2020202020202020202020202f2f20746f2063616c63756c617465207468652045564d206164647265737320666f72207468697320636164656e6365206f776e6564206163636f756e740a20202020202020202020202073656c662e616464726573734279746573203d205b302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20302c20305d0a20202020202020207d0a0a202020202020202061636365737328636f6e7472616374290a202020202020202066756e20696e697441646472657373286164647265737342797465733a205b55496e74383b2032305d29207b0a20202020202020202020202f2f206f6e6c7920616c6c6f7720736574206164647265737320666f72207468652066697273742074696d650a20202020202020202020202f2f20636865636b206164647265737320697320656d7074790a202020202020202020202020666f72206974656d20696e2073656c662e616464726573734279746573207b0a20202020202020202020202020202020617373657274286974656d203d3d20302c206d6573736167653a2022616464726573732062797465206973206e6f7420656d70747922290a2020202020202020202020207d0a202020202020202020202073656c662e616464726573734279746573203d206164647265737342797465730a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e206164647265737328293a2045564d41646472657373207b0a2020202020202020202020202f2f20416c77617973206372656174652061206e65772045564d4164647265737320696e7374616e63650a20202020202020202020202072657475726e2045564d416464726573732862797465733a2073656c662e616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f204765742062616c616e6365206f662074686520636164656e6365206f776e6564206163636f756e740a202020202020202061636365737328616c6c290a2020202020202020766965772066756e2062616c616e636528293a2042616c616e6365207b0a20202020202020202020202072657475726e2073656c662e6164647265737328292e62616c616e636528290a20202020202020207d0a0a20202020202020202f2f2f204465706f736974732074686520676976656e207661756c7420696e746f2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369742866726f6d3a2040466c6f77546f6b656e2e5661756c7429207b0a20202020202020202020202073656c662e6164647265737328292e6465706f7369742866726f6d3a203c2d66726f6d290a20202020202020207d0a0a20202020202020202f2f2f205468652045564d2061646472657373206f662074686520636164656e6365206f776e6564206163636f756e7420626568696e6420616e20656e7469746c656d656e742c20616374696e672061732070726f6f66206f66206163636573730a2020202020202020616363657373284f776e6572207c2056616c6964617465290a2020202020202020766965772066756e2070726f7465637465644164647265737328293a2045564d41646472657373207b0a20202020202020202020202072657475726e2073656c662e6164647265737328290a20202020202020207d0a0a20202020202020202f2f2f20576974686472617773207468652062616c616e63652066726f6d2074686520636164656e6365206f776e6564206163636f756e7427732062616c616e63650a20202020202020202f2f2f204e6f7465207468617420616d6f756e747320736d616c6c6572207468616e2031306e4620283130652d38292063616e27742062652077697468647261776e0a20202020202020202f2f2f20676976656e207468617420466c6f7720546f6b656e205661756c747320757365205546697836347320746f2073746f72652062616c616e6365732e0a20202020202020202f2f2f2049662074686520676976656e2062616c616e636520636f6e76657273696f6e20746f2055466978363420726573756c747320696e0a20202020202020202f2f2f20726f756e64696e67206572726f722c20746869732066756e6374696f6e20776f756c64206661696c2e0a2020202020202020616363657373284f776e6572207c205769746864726177290a202020202020202066756e2077697468647261772862616c616e63653a2042616c616e6365293a2040466c6f77546f6b656e2e5661756c74207b0a20202020202020202020202069662062616c616e63652e69735a65726f2829207b0a2020202020202020202020202020202070616e6963282263616c6c696e672077697468647261772066756e6374696f6e2077697468207a65726f2062616c616e6365206973206e6f7420616c6c6f77656422290a2020202020202020202020207d0a2020202020202020202020206c6574207661756c74203c2d20496e7465726e616c45564d2e7769746864726177280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020616d6f756e743a2062616c616e63652e6174746f666c6f770a20202020202020202020202029206173212040466c6f77546f6b656e2e5661756c740a202020202020202020202020656d697420464c4f57546f6b656e7357697468647261776e286164647265737342797465733a2073656c662e6164647265737342797465732c20616d6f756e743a2062616c616e63652e696e464c4f572829290a20202020202020202020202072657475726e203c2d7661756c740a20202020202020207d0a0a20202020202020202f2f2f204465706c6f7973206120636f6e747261637420746f207468652045564d20656e7669726f6e6d656e742e0a20202020202020202f2f2f2052657475726e73207468652061646472657373206f6620746865206e65776c79206465706c6f79656420636f6e74726163740a2020202020202020616363657373284f776e6572207c204465706c6f79290a202020202020202066756e206465706c6f79280a202020202020202020202020636f64653a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a2045564d41646472657373207b0a2020202020202020202020206c657420616464726573734279746573203d20496e7465726e616c45564d2e6465706c6f79280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020636f64653a20636f64652c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020290a20202020202020202020202072657475726e2045564d416464726573732862797465733a20616464726573734279746573290a20202020202020207d0a0a20202020202020202f2f2f2043616c6c7320612066756e6374696f6e20776974682074686520676976656e20646174612e0a20202020202020202f2f2f2054686520657865637574696f6e206973206c696d697465642062792074686520676976656e20616d6f756e74206f66206761730a2020202020202020616363657373284f776e6572207c2043616c6c290a202020202020202066756e2063616c6c280a202020202020202020202020746f3a2045564d416464726573732c0a202020202020202020202020646174613a205b55496e74385d2c0a2020202020202020202020206761734c696d69743a2055496e7436342c0a20202020202020202020202076616c75653a2042616c616e63650a2020202020202020293a20526573756c74207b0a20202020202020202020202072657475726e20496e7465726e616c45564d2e63616c6c280a2020202020202020202020202020202066726f6d3a2073656c662e6164647265737342797465732c0a20202020202020202020202020202020746f3a20746f2e62797465732c0a20202020202020202020202020202020646174613a20646174612c0a202020202020202020202020202020206761734c696d69743a206761734c696d69742c0a2020202020202020202020202020202076616c75653a2076616c75652e6174746f666c6f770a202020202020202020202020292061732120526573756c740a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e465420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f7369744e4654286e66743a203c2d6e66742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e204e46542066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e2074686520726571756573746564204e465420696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e2077697468647261774e4654280a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e77697468647261774e4654280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a2020202020202020202020202020202069643a2069642c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e205661756c7420746f207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720612066656520746f2066756c66696c6c0a20202020202020202f2f2f207468652062726964676520726571756573740a202020202020202061636365737328616c6c290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a202020202020202029207b0a20202020202020202020202045564d2e626f72726f774272696467654163636573736f7228292e6465706f736974546f6b656e73287661756c743a203c2d7661756c742c20746f3a2073656c662e6164647265737328292c2066656550726f76696465723a2066656550726f7669646572290a20202020202020207d0a0a20202020202020202f2f2f20427269646765732074686520676976656e2066756e6769626c6520746f6b656e732066726f6d207468652045564d20656e7669726f6e6d656e742c20726571756972696e6720612050726f76696465722066726f6d20776869636820746f20776974686472617720610a20202020202020202f2f2f2066656520746f2066756c66696c6c207468652062726964676520726571756573742e204e6f74653a207468652063616c6c65722073686f756c64206f776e207468652072657175657374656420746f6b656e7320262073756666696369656e742062616c616e6365206f660a20202020202020202f2f2f2072657175657374656420746f6b656e7320696e2045564d0a2020202020202020616363657373284f776e6572207c20427269646765290a202020202020202066756e207769746864726177546f6b656e73280a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a20202020202020202020202072657475726e203c2d2045564d2e626f72726f774272696467654163636573736f7228292e7769746864726177546f6b656e73280a2020202020202020202020202020202063616c6c65723a202673656c6620617320617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a20202020202020202020202020202020747970653a20747970652c0a20202020202020202020202020202020616d6f756e743a20616d6f756e742c0a2020202020202020202020202020202066656550726f76696465723a2066656550726f76696465720a202020202020202020202020290a20202020202020207d0a202020207d0a0a202020202f2f2f20437265617465732061206e657720636164656e6365206f776e6564206163636f756e740a2020202061636365737328616c6c290a2020202066756e20637265617465436164656e63654f776e65644163636f756e7428293a2040436164656e63654f776e65644163636f756e74207b0a20202020202020206c657420616363203c2d63726561746520436164656e63654f776e65644163636f756e7428290a20202020202020206c65742061646472203d20496e7465726e616c45564d2e637265617465436164656e63654f776e65644163636f756e7428757569643a206163632e75756964290a20202020202020206163632e696e697441646472657373286164647265737342797465733a2061646472290a2020202020202020656d697420436164656e63654f776e65644163636f756e7443726561746564286164647265737342797465733a2061646472290a202020202020202072657475726e203c2d6163630a202020207d0a0a202020202f2f2f2052756e7320616e206120524c502d656e636f6465642045564d207472616e73616374696f6e2c2064656475637473207468652067617320666565732c0a202020202f2f2f20616e64206465706f736974732074686520676173206665657320696e746f207468652070726f766964656420636f696e6261736520616464726573732e0a2020202061636365737328616c6c290a2020202066756e2072756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a202020202020202072657475726e20496e7465726e616c45564d2e72756e280a2020202020202020202020202020202074783a2074782c0a20202020202020202020202020202020636f696e626173653a20636f696e626173652e62797465730a2020202020202020292061732120526573756c740a202020207d0a0a202020202f2f2f206d75737452756e2072756e7320746865207472616e73616374696f6e207573696e672045564d2e72756e207965742069740a202020202f2f2f20726f6c6c6261636b2069662074686520747820657865637574696f6e2073746174757320697320756e6b6e6f776e206f7220696e76616c69642e0a202020202f2f2f204e6f746520746861742074686973206d6574686f6420646f6573206e6f7420726f6c6c6261636b206966207472616e73616374696f6e0a202020202f2f2f2069732065786563757465642062757420616e20766d206572726f72206973207265706f7274656420617320746865206f7574636f6d650a202020202f2f2f206f662074686520657865637574696f6e20287374617475733a206661696c6564292e0a2020202061636365737328616c6c290a2020202066756e206d75737452756e2874783a205b55496e74385d2c20636f696e626173653a2045564d41646472657373293a20526573756c74207b0a20202020202020206c65742072756e526573756c74203d2073656c662e72756e2874783a2074782c20636f696e626173653a20636f696e62617365290a2020202020202020617373657274280a20202020202020202020202072756e526573756c742e737461747573203d3d205374617475732e6661696c6564207c7c2072756e526573756c742e737461747573203d3d205374617475732e7375636365737366756c2c0a2020202020202020202020206d6573736167653a20227478206973206e6f742076616c696420666f7220657865637574696f6e220a2020202020202020290a202020202020202072657475726e2072756e526573756c740a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249285f2076616c7565733a205b416e795374727563745d293a205b55496e74385d207b0a202020202020202072657475726e20496e7465726e616c45564d2e656e636f64654142492876616c756573290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f64654142492874797065733a205b547970655d2c20646174613a205b55496e74385d293a205b416e795374727563745d207b0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e20656e636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a20202020202020205f2076616c7565733a205b416e795374727563745d0a20202020293a205b55496e74385d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a20202020202020206c657420617267756d656e7473203d20496e7465726e616c45564d2e656e636f64654142492876616c756573290a0a202020202020202072657475726e206d6574686f6449442e636f6e63617428617267756d656e7473290a202020207d0a0a2020202061636365737328616c6c290a2020202066756e206465636f6465414249576974685369676e6174757265280a20202020202020205f207369676e61747572653a20537472696e672c0a202020202020202074797065733a205b547970655d2c0a2020202020202020646174613a205b55496e74385d0a20202020293a205b416e795374727563745d207b0a20202020202020206c6574206d6574686f644944203d2048617368416c676f726974686d2e4b454343414b5f3235362e68617368280a2020202020202020202020207369676e61747572652e757466380a2020202020202020292e736c6963652866726f6d3a20302c207570546f3a2034290a0a2020202020202020666f72206279746520696e206d6574686f644944207b0a2020202020202020202020206966206279746520213d20646174612e72656d6f766546697273742829207b0a2020202020202020202020202020202070616e696328227369676e6174757265206d69736d6174636822290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e20496e7465726e616c45564d2e6465636f64654142492874797065733a2074797065732c20646174613a2064617461290a202020207d0a0a202020202f2f2f2056616c69646174696f6e526573756c742072657475726e732074686520726573756c74206f6620434f41206f776e6572736869702070726f6f662076616c69646174696f6e0a2020202061636365737328616c6c290a202020207374727563742056616c69646174696f6e526573756c74207b0a202020202020202061636365737328616c6c290a20202020202020206c657420697356616c69643a20426f6f6c0a0a202020202020202061636365737328616c6c290a20202020202020206c65742070726f626c656d3a20537472696e673f0a0a2020202020202020696e697428697356616c69643a20426f6f6c2c2070726f626c656d3a20537472696e673f29207b0a20202020202020202020202073656c662e697356616c6964203d20697356616c69640a20202020202020202020202073656c662e70726f626c656d203d2070726f626c656d0a20202020202020207d0a202020207d0a0a202020202f2f2f2076616c6964617465434f414f776e65727368697050726f6f662076616c696461746573206120434f41206f776e6572736869702070726f6f660a2020202061636365737328616c6c290a2020202066756e2076616c6964617465434f414f776e65727368697050726f6f66280a2020202020202020616464726573733a20416464726573732c0a2020202020202020706174683a205075626c6963506174682c0a20202020202020207369676e6564446174613a205b55496e74385d2c0a20202020202020206b6579496e64696365733a205b55496e7436345d2c0a20202020202020207369676e6174757265733a205b5b55496e74385d5d2c0a202020202020202065766d416464726573733a205b55496e74383b2032305d0a20202020293a2056616c69646174696f6e526573756c74207b0a0a20202020202020202f2f206d616b65207369676e6174757265207365742066697273740a20202020202020202f2f20636865636b206e756d626572206f66207369676e617475726573206d617463686573206e756d626572206f66206b657920696e64696365730a20202020202020206966206b6579496e64696365732e6c656e67746820213d207369676e6174757265732e6c656e677468207b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a20226b657920696e64696365732073697a6520646f65736e2774206d6174636820746865207369676e617475726573220a202020202020202020202020290a20202020202020207d0a0a2020202020202020766172207369676e61747572655365743a205b43727970746f2e4b65794c6973745369676e61747572655d203d205b5d0a2020202020202020666f72207369676e6174757265496e6465782c207369676e617475726520696e207369676e6174757265737b0a2020202020202020202020207369676e61747572655365742e617070656e642843727970746f2e4b65794c6973745369676e6174757265280a202020202020202020202020202020206b6579496e6465783a20496e74286b6579496e64696365735b7369676e6174757265496e6465785d292c0a202020202020202020202020202020207369676e61747572653a207369676e61747572650a20202020202020202020202029290a20202020202020207d0a0a20202020202020202f2f206665746368206163636f756e740a20202020202020206c657420616363203d206765744163636f756e742861646472657373290a0a20202020202020202f2f20636f6e737472756374696e67206b6579206c6973740a20202020202020206c6574206b65794c697374203d2043727970746f2e4b65794c69737428290a2020202020202020666f72207369676e617475726520696e207369676e6174757265536574207b0a2020202020202020202020206c6574206b6579203d206163632e6b6579732e676574286b6579496e6465783a207369676e61747572652e6b6579496e64657829210a20202020202020202020202061737365727428216b65792e69735265766f6b65642c206d6573736167653a20227265766f6b6564206b6579206973207573656422290a2020202020202020202020206b65794c6973742e616464280a20202020202020202020202020206b65792e7075626c69634b65792c0a202020202020202020202020202068617368416c676f726974686d3a206b65792e68617368416c676f726974686d2c0a20202020202020202020202020207765696768743a206b65792e7765696768742c0a2020202020202020202020290a20202020202020207d0a0a20202020202020206c657420697356616c6964203d206b65794c6973742e766572696679280a2020202020202020202020207369676e61747572655365743a207369676e61747572655365742c0a2020202020202020202020207369676e6564446174613a207369676e6564446174612c0a202020202020202020202020646f6d61696e53657061726174696f6e5461673a2022464c4f572d56302e302d75736572220a2020202020202020290a0a202020202020202069662021697356616c69647b0a20202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a20202020202020202020202020202020697356616c69643a2066616c73652c0a2020202020202020202020202020202070726f626c656d3a202274686520676976656e207369676e61747572657320617265206e6f742076616c6964206f722070726f7669646520656e6f75676820776569676874220a202020202020202020202020290a20202020202020207d0a0a20202020202020206c657420636f61526566203d206163632e6361706162696c69746965732e626f72726f773c2645564d2e436164656e63654f776e65644163636f756e743e2870617468290a2020202020202020696620636f61526566203d3d206e696c207b0a2020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202070726f626c656d3a2022636f756c64206e6f7420626f72726f7720627269646765206163636f756e742773207265736f75726365220a20202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f207665726966792065766d2061646472657373206d61746368696e670a20202020202020207661722061646472203d20636f61526566212e6164647265737328290a2020202020202020666f7220696e6465782c206974656d20696e20636f61526566212e6164647265737328292e6279746573207b0a2020202020202020202020206966206974656d20213d2065766d416464726573735b696e6465785d207b0a2020202020202020202020202020202072657475726e2056616c69646174696f6e526573756c74280a2020202020202020202020202020202020202020697356616c69643a2066616c73652c0a202020202020202020202020202020202020202070726f626c656d3a202265766d2061646472657373206d69736d61746368220a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a0a202020202020202072657475726e2056616c69646174696f6e526573756c74280a202020202020202020202020697356616c69643a20747275652c0a20202020202020202020202070726f626c656d3a206e696c0a2020202020202020290a202020207d0a0a202020202f2f2f20426c6f636b2072657475726e7320696e666f726d6174696f6e2061626f757420746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a202020207374727563742045564d426c6f636b207b0a202020202020202061636365737328616c6c290a20202020202020206c6574206865696768743a2055496e7436340a0a202020202020202061636365737328616c6c290a20202020202020206c657420686173683a20537472696e670a0a202020202020202061636365737328616c6c290a20202020202020206c657420746f74616c537570706c793a20496e740a0a2020202020202020696e6974286865696768743a2055496e7436342c20686173683a20537472696e672c20746f74616c537570706c793a20496e7429207b0a20202020202020202020202073656c662e686569676874203d206865696768740a20202020202020202020202073656c662e68617368203d20686173680a20202020202020202020202073656c662e746f74616c537570706c79203d20746f74616c537570706c790a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e7320746865206c617465737420657865637574656420626c6f636b2e0a2020202061636365737328616c6c290a2020202066756e206765744c6174657374426c6f636b28293a2045564d426c6f636b207b0a202020202020202072657475726e20496e7465726e616c45564d2e6765744c6174657374426c6f636b2829206173212045564d426c6f636b0a202020207d0a0a202020202f2f2f20496e7465726661636520666f722061207265736f75726365207768696368206163747320617320616e20656e747279706f696e7420746f2074686520564d206272696467650a2020202061636365737328616c6c290a202020207265736f7572636520696e74657266616365204272696467654163636573736f72207b0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e465420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f7369744e4654280a2020202020202020202020206e66743a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620616e204e46542066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e2077697468647261774e4654280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a20202020202020202020202069643a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d0a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f6620612066756e6769626c6520746f6b656e207661756c7420746f2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e206465706f736974546f6b656e73280a2020202020202020202020207661756c743a20407b46756e6769626c65546f6b656e2e5661756c747d2c0a202020202020202020202020746f3a2045564d416464726573732c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020290a0a20202020202020202f2f2f20456e64706f696e7420656e61626c696e6720746865206272696467696e67206f662066756e6769626c6520746f6b656e732066726f6d2045564d0a202020202020202061636365737328427269646765290a202020202020202066756e207769746864726177546f6b656e73280a20202020202020202020202063616c6c65723a20617574682843616c6c292026436164656e63654f776e65644163636f756e742c0a202020202020202020202020747970653a20547970652c0a202020202020202020202020616d6f756e743a2055496e743235362c0a20202020202020202020202066656550726f76696465723a20617574682846756e6769626c65546f6b656e2e57697468647261772920267b46756e6769626c65546f6b656e2e50726f76696465727d0a2020202020202020293a20407b46756e6769626c65546f6b656e2e5661756c747d0a202020207d0a0a202020202f2f2f20496e746572666163652077686963682063617074757265732061204361706162696c69747920746f2074686520627269646765204163636573736f722c20736176696e672069742077697468696e2074686520427269646765526f75746572207265736f757263650a2020202061636365737328616c6c290a202020207265736f7572636520696e7465726661636520427269646765526f75746572207b0a0a20202020202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a2020202020202020616363657373284272696467652920766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d0a0a20202020202020202f2f2f205365747320746865204272696467654163636573736f72204361706162696c69747920696e2074686520427269646765526f757465720a202020202020202061636365737328427269646765292066756e207365744272696467654163636573736f72285f206163636573736f723a204361706162696c6974793c61757468284272696467652920267b4272696467654163636573736f727d3e29207b0a202020202020202020202020707265207b0a202020202020202020202020202020206163636573736f722e636865636b28293a2022496e76616c6964204272696467654163636573736f72204361706162696c6974792070726f7669646564220a20202020202020202020202020202020656d6974204272696467654163636573736f7255706461746564280a2020202020202020202020202020202020202020726f75746572547970653a2073656c662e6765745479706528292c0a2020202020202020202020202020202020202020726f75746572555549443a2073656c662e757569642c0a2020202020202020202020202020202020202020726f75746572416464726573733a2073656c662e6f776e65723f2e61646472657373203f3f2070616e69632822526f75746572206d757374206861766520616e206f776e657220746f206265206964656e74696669656422292c0a20202020202020202020202020202020202020206163636573736f72547970653a206163636573736f722e626f72726f772829212e6765745479706528292c0a20202020202020202020202020202020202020206163636573736f72555549443a206163636573736f722e626f72726f772829212e757569642c0a20202020202020202020202020202020202020206163636573736f72416464726573733a206163636573736f722e616464726573730a20202020202020202020202020202020290a2020202020202020202020207d0a20202020202020207d0a202020207d0a0a202020202f2f2f2052657475726e732061207265666572656e636520746f20746865204272696467654163636573736f722064657369676e6174656420666f7220696e7465726e616c206272696467652072657175657374730a202020206163636573732873656c66290a20202020766965772066756e20626f72726f774272696467654163636573736f7228293a2061757468284272696467652920267b4272696467654163636573736f727d207b0a202020202020202072657475726e2073656c662e6163636f756e742e73746f726167652e626f72726f773c61757468284272696467652920267b427269646765526f757465727d3e2866726f6d3a202f73746f726167652f65766d427269646765526f75746572290a2020202020202020202020203f2e626f72726f774272696467654163636573736f7228290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f207468652045564d2062726964676522290a202020207d0a7d0a" access(all) let compiledFactoryBytecode = "608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61484a806100a56000396000f3fe60806040523480156200001157600080fd5b5060043610620000c35760003560e01c8063715018a6116200007a578063715018a6146200018f5780638da5cb5b146200019b578063d56e0ccf14620001ad578063daa09e5414620001e4578063f2fde38b14620001fb578063f93241dd146200021257600080fd5b806304433bbc14620000c85780630a2c0ce914620000fc578063263e0c1b1462000122578063335f4c76146200014a57806340f8d42b146200016157806361a169051462000178575b600080fd5b620000df620000d936600462000c0a565b62000229565b6040516001600160a01b0390911681526020015b60405180910390f35b620001136200010d36600462000c4b565b6200025c565b604051620000f3919062000cd1565b620001396200013336600462000c4b565b62000310565b6040519015158152602001620000f3565b620001396200015b36600462000c4b565b62000724565b620000df6200017236600462000ce6565b62000752565b620000df6200018936600462000ce6565b62000853565b6200019962000942565b005b6000546001600160a01b0316620000df565b620000df620001be36600462000c0a565b80516020818301810180516001825292820191909301209152546001600160a01b031681565b62000139620001f536600462000c4b565b6200095a565b620001996200020c36600462000c4b565b620009da565b620001136200022336600462000c4b565b62000a22565b60006001826040516200023d919062000dc8565b908152604051908190036020019020546001600160a01b031692915050565b6001600160a01b0381166000908152600260205260409020805460609190620002859062000de6565b80601f0160208091040260200160405190810160405280929190818152602001828054620002b39062000de6565b8015620003045780601f10620002d85761010080835404028352916020019162000304565b820191906000526020600020905b815481529060010190602001808311620002e657829003601f168201915b50505050509050919050565b60408051600481526024810182526020810180516001600160e01b03166318160ddd60e01b1790529051600091829182916001600160a01b0386169162000358919062000dc8565b600060405180830381855afa9150503d806000811462000395576040519150601f19603f3d011682016040523d82523d6000602084013e6200039a565b606091505b5091509150811580620003ac57508051155b15620003bc575060009392505050565b604051600060248201526001600160a01b0385169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b179052516200040b919062000dc8565b600060405180830381855afa9150503d806000811462000448576040519150601f19603f3d011682016040523d82523d6000602084013e6200044d565b606091505b5090925090508115806200046057508051155b1562000470575060009392505050565b60405160006024820181905260448201526001600160a01b0385169060640160408051601f198184030181529181526020820180516001600160e01b0316636eb1769f60e11b17905251620004c6919062000dc8565b600060405180830381855afa9150503d806000811462000503576040519150601f19603f3d011682016040523d82523d6000602084013e62000508565b606091505b5090925090508115806200051b57508051155b156200052b575060009392505050565b60408051600481526024810182526020810180516001600160e01b03166306fdde0360e01b17905290516001600160a01b038616916200056b9162000dc8565b600060405180830381855afa9150503d8060008114620005a8576040519150601f19603f3d011682016040523d82523d6000602084013e620005ad565b606091505b509092509050811580620005c057508051155b15620005d0575060009392505050565b60408051600481526024810182526020810180516001600160e01b03166395d89b4160e01b17905290516001600160a01b03861691620006109162000dc8565b600060405180830381855afa9150503d80600081146200064d576040519150601f19603f3d011682016040523d82523d6000602084013e62000652565b606091505b5090925090508115806200066557508051155b1562000675575060009392505050565b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290516001600160a01b03861691620006b59162000dc8565b600060405180830381855afa9150503d8060008114620006f2576040519150601f19603f3d011682016040523d82523d6000602084013e620006f7565b606091505b5090925090508115806200070a57508051155b156200071a575060009392505050565b5060019392505050565b6001600160a01b03811660009081526002602052604081208054620007499062000de6565b15159392505050565b60006200075e62000ac4565b600080546001600160a01b031687878787876040516200077e9062000b43565b6200078f9695949392919062000e22565b604051809103906000f080158015620007ac573d6000803e3d6000fd5b50905080600185604051620007c2919062000dc8565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918316600090815260029091522062000807858262000f00565b507f99a64021330f1af36b3fd5f64a1d12b99b8ddf91fa553618c4df01ffba4c1cee81888888886040516200084195949392919062000fcd565b60405180910390a19695505050505050565b60006200085f62000ac4565b600080546001600160a01b031687878787876040516200087f9062000b51565b620008909695949392919062000e22565b604051809103906000f080158015620008ad573d6000803e3d6000fd5b50905080600185604051620008c3919062000dc8565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918316600090815260029091522062000908858262000f00565b507fbebce54951ebf20c0dcd195a45bb2388d9ac8e38b5974e00bb63c5822dbe65f081888888886040516200084195949392919062000fcd565b6200094c62000ac4565b62000958600062000af3565b565b6040516301ffc9a760e01b81526380ac58cd60e01b60048201526000906001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015620009c7575060408051601f3d908101601f19168201909252620009c4918101906200103f565b60015b620009d457506000919050565b92915050565b620009e462000ac4565b6001600160a01b03811662000a1457604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000a1f8162000af3565b50565b6002602052600090815260409020805462000a3d9062000de6565b80601f016020809104026020016040519081016040528092919081815260200182805462000a6b9062000de6565b801562000abc5780601f1062000a905761010080835404028352916020019162000abc565b820191906000526020600020905b81548152906001019060200180831162000a9e57829003601f168201915b505050505081565b6000546001600160a01b03163314620009585760405163118cdaa760e01b815233600482015260240162000a0b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6118fa806200106483390190565b611eb7806200295e83390190565b634e487b7160e01b600052604160045260246000fd5b600082601f83011262000b8757600080fd5b813567ffffffffffffffff8082111562000ba55762000ba562000b5f565b604051601f8301601f19908116603f0116810190828211818310171562000bd05762000bd062000b5f565b8160405283815286602085880101111562000bea57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121562000c1d57600080fd5b813567ffffffffffffffff81111562000c3557600080fd5b62000c438482850162000b75565b949350505050565b60006020828403121562000c5e57600080fd5b81356001600160a01b038116811462000c7657600080fd5b9392505050565b60005b8381101562000c9a57818101518382015260200162000c80565b50506000910152565b6000815180845262000cbd81602086016020860162000c7d565b601f01601f19169290920160200192915050565b60208152600062000c76602083018462000ca3565b600080600080600060a0868803121562000cff57600080fd5b853567ffffffffffffffff8082111562000d1857600080fd5b62000d2689838a0162000b75565b9650602088013591508082111562000d3d57600080fd5b62000d4b89838a0162000b75565b9550604088013591508082111562000d6257600080fd5b62000d7089838a0162000b75565b9450606088013591508082111562000d8757600080fd5b62000d9589838a0162000b75565b9350608088013591508082111562000dac57600080fd5b5062000dbb8882890162000b75565b9150509295509295909350565b6000825162000ddc81846020870162000c7d565b9190910192915050565b600181811c9082168062000dfb57607f821691505b60208210810362000e1c57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038716815260c06020820181905260009062000e489083018862000ca3565b828103604084015262000e5c818862000ca3565b9050828103606084015262000e72818762000ca3565b9050828103608084015262000e88818662000ca3565b905082810360a084015262000e9e818562000ca3565b9998505050505050505050565b601f82111562000efb576000816000526020600020601f850160051c8101602086101562000ed65750805b601f850160051c820191505b8181101562000ef75782815560010162000ee2565b5050505b505050565b815167ffffffffffffffff81111562000f1d5762000f1d62000b5f565b62000f358162000f2e845462000de6565b8462000eab565b602080601f83116001811462000f6d576000841562000f545750858301515b600019600386901b1c1916600185901b17855562000ef7565b600085815260208120601f198616915b8281101562000f9e5788860151825594840194600190910190840162000f7d565b508582101562000fbd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b038616815260a06020820181905260009062000ff39083018762000ca3565b828103604084015262001007818762000ca3565b905082810360608401526200101d818662000ca3565b9050828103608084015262001033818562000ca3565b98975050505050505050565b6000602082840312156200105257600080fd5b8151801515811462000c7657600080fdfe6101606040523480156200001257600080fd5b50604051620018fa380380620018fa833981016040819052620000359162000357565b6040805180820190915260018152603160f81b6020820152859081908882886003620000628382620004db565b506004620000718282620004db565b5050506001600160a01b038116620000a457604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000af816200019f565b50620000bd826006620001f1565b61012052620000ce816007620001f1565b61014052815160208084019190912060e052815190820120610100524660a0526200015c60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506009620001748482620004db565b50600a620001838382620004db565b50600b620001928282620004db565b5050505050505062000601565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602083511015620002115762000209836200022a565b905062000224565b816200021e8482620004db565b5060ff90505b92915050565b600080829050601f8151111562000258578260405163305a27a960e01b81526004016200009b9190620005a7565b80516200026582620005dc565b179392505050565b80516001600160a01b03811681146200028557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620002bd578181015183820152602001620002a3565b50506000910152565b600082601f830112620002d857600080fd5b81516001600160401b0380821115620002f557620002f56200028a565b604051601f8301601f19908116603f011681019082821181831017156200032057620003206200028a565b816040528381528660208588010111156200033a57600080fd5b6200034d846020830160208901620002a0565b9695505050505050565b60008060008060008060c087890312156200037157600080fd5b6200037c876200026d565b60208801519096506001600160401b03808211156200039a57600080fd5b620003a88a838b01620002c6565b96506040890151915080821115620003bf57600080fd5b620003cd8a838b01620002c6565b95506060890151915080821115620003e457600080fd5b620003f28a838b01620002c6565b945060808901519150808211156200040957600080fd5b620004178a838b01620002c6565b935060a08901519150808211156200042e57600080fd5b506200043d89828a01620002c6565b9150509295509295509295565b600181811c908216806200045f57607f821691505b6020821081036200048057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004d6576000816000526020600020601f850160051c81016020861015620004b15750805b601f850160051c820191505b81811015620004d257828155600101620004bd565b5050505b505050565b81516001600160401b03811115620004f757620004f76200028a565b6200050f816200050884546200044a565b8462000486565b602080601f8311600181146200054757600084156200052e5750858301515b600019600386901b1c1916600185901b178555620004d2565b600085815260208120601f198616915b82811015620005785788860151825594840194600190910190840162000557565b5085821015620005975787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020815260008251806020840152620005c8816040850160208701620002a0565b601f01601f19169190910160400192915050565b80516020808301519190811015620004805760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161129e6200065c6000396000610a8801526000610a5b01526000610918015260006108f00152600061084b015260006108750152600061089f015261129e6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063715018a6116100de578063a76b4d5611610097578063dc9716eb11610071578063dc9716eb146102f8578063dd62ed3e14610300578063e8a3d48514610339578063f2fde38b1461034157600080fd5b8063a76b4d56146102ca578063a9059cbb146102d2578063d505accf146102e557600080fd5b8063715018a61461025e57806379cc6790146102665780637ecebe001461027957806384b0196e1461028c5780638da5cb5b146102a757806395d89b41146102c257600080fd5b8063313ce56711610130578063313ce567146101ee5780633644e515146101fd5780633fd4d4a81461020557806340c10f191461020d57806342966c681461022257806370a082311461023557600080fd5b806306fdde0314610178578063095ea7b3146101965780630cd9acb7146101b9578063120a88ad146101c157806318160ddd146101c957806323b872dd146101db575b600080fd5b610180610354565b60405161018d9190610fe8565b60405180910390f35b6101a96101a436600461101e565b6103e6565b604051901515815260200161018d565b610180610400565b61018061048e565b6002545b60405190815260200161018d565b6101a96101e9366004611048565b61049d565b6040516012815260200161018d565b6101cd6104c1565b6101806104d0565b61022061021b36600461101e565b6104df565b005b610220610230366004611084565b6104f5565b6101cd61024336600461109d565b6001600160a01b031660009081526020819052604090205490565b610220610502565b61022061027436600461101e565b610516565b6101cd61028736600461109d565b61052b565b610294610549565b60405161018d97969594939291906110b8565b6005546040516001600160a01b03909116815260200161018d565b61018061058f565b61018061059e565b6101a96102e036600461101e565b6105ab565b6102206102f3366004611151565b6105b9565b6101806106f8565b6101cd61030e3660046111c4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610180610705565b61022061034f36600461109d565b610714565b606060038054610363906111f7565b80601f016020809104026020016040519081016040528092919081815260200182805461038f906111f7565b80156103dc5780601f106103b1576101008083540402835291602001916103dc565b820191906000526020600020905b8154815290600101906020018083116103bf57829003601f168201915b5050505050905090565b6000336103f481858561074f565b60019150505b92915050565b6009805461040d906111f7565b80601f0160208091040260200160405190810160405280929190818152602001828054610439906111f7565b80156104865780601f1061045b57610100808354040283529160200191610486565b820191906000526020600020905b81548152906001019060200180831161046957829003601f168201915b505050505081565b606060098054610363906111f7565b6000336104ab858285610761565b6104b68585856107df565b506001949350505050565b60006104cb61083e565b905090565b6060600a8054610363906111f7565b6104e7610969565b6104f18282610996565b5050565b6104ff33826109cc565b50565b61050a610969565b6105146000610a02565b565b610521823383610761565b6104f182826109cc565b6001600160a01b0381166000908152600860205260408120546103fa565b60006060806000806000606061055d610a54565b610565610a81565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b606060048054610363906111f7565b600b805461040d906111f7565b6000336103f48185856107df565b834211156105e25760405163313c898160e11b8152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861062f8c6001600160a01b0316600090815260086020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061068a82610aae565b9050600061069a82878787610adb565b9050896001600160a01b0316816001600160a01b0316146106e1576040516325c0072360e11b81526001600160a01b0380831660048301528b1660248201526044016105d9565b6106ec8a8a8a61074f565b50505050505050505050565b600a805461040d906111f7565b6060600b8054610363906111f7565b61071c610969565b6001600160a01b03811661074657604051631e4fbdf760e01b8152600060048201526024016105d9565b6104ff81610a02565b61075c8383836001610b09565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146107d957818110156107ca57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105d9565b6107d984848484036000610b09565b50505050565b6001600160a01b03831661080957604051634b637e8f60e11b8152600060048201526024016105d9565b6001600160a01b0382166108335760405163ec442f0560e01b8152600060048201526024016105d9565b61075c838383610bde565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561089757507f000000000000000000000000000000000000000000000000000000000000000046145b156108c157507f000000000000000000000000000000000000000000000000000000000000000090565b6104cb604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6005546001600160a01b031633146105145760405163118cdaa760e01b81523360048201526024016105d9565b6001600160a01b0382166109c05760405163ec442f0560e01b8152600060048201526024016105d9565b6104f160008383610bde565b6001600160a01b0382166109f657604051634b637e8f60e11b8152600060048201526024016105d9565b6104f182600083610bde565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606104cb7f00000000000000000000000000000000000000000000000000000000000000006006610d08565b60606104cb7f00000000000000000000000000000000000000000000000000000000000000006007610d08565b60006103fa610abb61083e565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080610aed88888888610db3565b925092509250610afd8282610e82565b50909695505050505050565b6001600160a01b038416610b335760405163e602df0560e01b8152600060048201526024016105d9565b6001600160a01b038316610b5d57604051634a1406b160e11b8152600060048201526024016105d9565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156107d957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610bd091815260200190565b60405180910390a350505050565b6001600160a01b038316610c09578060026000828254610bfe9190611231565b90915550610c7b9050565b6001600160a01b03831660009081526020819052604090205481811015610c5c5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105d9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610c9757600280548290039055610cb6565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610cfb91815260200190565b60405180910390a3505050565b606060ff8314610d2257610d1b83610f3b565b90506103fa565b818054610d2e906111f7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5a906111f7565b8015610da75780601f10610d7c57610100808354040283529160200191610da7565b820191906000526020600020905b815481529060010190602001808311610d8a57829003601f168201915b505050505090506103fa565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610dee5750600091506003905082610e78565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e42573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e6e57506000925060019150829050610e78565b9250600091508190505b9450945094915050565b6000826003811115610e9657610e96611252565b03610e9f575050565b6001826003811115610eb357610eb3611252565b03610ed15760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ee557610ee5611252565b03610f065760405163fce698f760e01b8152600481018290526024016105d9565b6003826003811115610f1a57610f1a611252565b036104f1576040516335e2f38360e21b8152600481018290526024016105d9565b60606000610f4883610f7a565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f8111156103fa57604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b81811015610fc857602081850181015186830182015201610fac565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610ffb6020830184610fa2565b9392505050565b80356001600160a01b038116811461101957600080fd5b919050565b6000806040838503121561103157600080fd5b61103a83611002565b946020939093013593505050565b60008060006060848603121561105d57600080fd5b61106684611002565b925061107460208501611002565b9150604084013590509250925092565b60006020828403121561109657600080fd5b5035919050565b6000602082840312156110af57600080fd5b610ffb82611002565b60ff60f81b881681526000602060e060208401526110d960e084018a610fa2565b83810360408501526110eb818a610fa2565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561113f57835183529284019291840191600101611123565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561116c57600080fd5b61117588611002565b965061118360208901611002565b95506040880135945060608801359350608088013560ff811681146111a757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156111d757600080fd5b6111e083611002565b91506111ee60208401611002565b90509250929050565b600181811c9082168061120b57607f821691505b60208210810361122b57634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156103fa57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea26469706673582212200fea5736ecebd6f4f71e77a0743e7169bb21209a84517a64d4e0a6b0313817b864736f6c6343000817003360806040523480156200001157600080fd5b5060405162001eb738038062001eb7833981016040819052620000349162000202565b858585600062000045838262000386565b50600162000054828262000386565b5050506001600160a01b0381166200008657604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200009181620000cb565b50600c620000a0848262000386565b50600d620000af838262000386565b50600e620000be828262000386565b5050505050505062000452565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200013557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200016257600080fd5b81516001600160401b03808211156200017f576200017f6200013a565b604051601f8301601f19908116603f01168101908282118183101715620001aa57620001aa6200013a565b8160405283815260209250866020858801011115620001c857600080fd5b600091505b83821015620001ec5785820183015181830184015290820190620001cd565b6000602085830101528094505050505092915050565b60008060008060008060c087890312156200021c57600080fd5b62000227876200011d565b60208801519096506001600160401b03808211156200024557600080fd5b620002538a838b0162000150565b965060408901519150808211156200026a57600080fd5b620002788a838b0162000150565b955060608901519150808211156200028f57600080fd5b6200029d8a838b0162000150565b94506080890151915080821115620002b457600080fd5b620002c28a838b0162000150565b935060a0890151915080821115620002d957600080fd5b50620002e889828a0162000150565b9150509295509295509295565b600181811c908216806200030a57607f821691505b6020821081036200032b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000381576000816000526020600020601f850160051c810160208610156200035c5750805b601f850160051c820191505b818110156200037d5782815560010162000368565b5050505b505050565b81516001600160401b03811115620003a257620003a26200013a565b620003ba81620003b38454620002f5565b8462000331565b602080601f831160018114620003f25760008415620003d95750858301515b600019600386901b1c1916600185901b1785556200037d565b600085815260208120601f198616915b82811015620004235788860151825594840194600190910190840162000402565b5085821015620004425787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611a5580620004626000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a76b4d56116100a2578063cd279c7c11610071578063cd279c7c146103a8578063e8a3d485146103bb578063e985e9c5146103c3578063f2fde38b146103d657600080fd5b8063a76b4d5614610372578063b49bbd941461037a578063b88d4fde14610382578063c87b56dd1461039557600080fd5b806394e29329116100de57806394e293291461034757806395d89b411461034f578063a159047b14610357578063a22cb4651461035f57600080fd5b806370a082311461031b578063715018a61461032e5780638da5cb5b1461033657600080fd5b80632f745c59116101715780634f558e791161014b5780634f558e79146102c25780634f6ccce7146102ed5780635e0a9661146103005780636352211e1461030857600080fd5b80632f745c591461028957806342842e0e1461029c57806342966c68146102af57600080fd5b8063095ea7b3116101ad578063095ea7b31461023c57806318160ddd1461025157806318e97fd11461026357806323b872dd1461027657600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063081812fc14610211575b600080fd5b6101e76101e2366004611494565b6103e9565b60405190151581526020015b60405180910390f35b6102046103fa565b6040516101f39190611501565b61022461021f366004611514565b61048c565b6040516001600160a01b0390911681526020016101f3565b61024f61024a366004611549565b6104b5565b005b6009545b6040519081526020016101f3565b61024f61027136600461161f565b6104c4565b61024f610284366004611666565b6104d6565b610255610297366004611549565b610566565b61024f6102aa366004611666565b6105cb565b61024f6102bd366004611514565b6105eb565b6101e76102d0366004611514565b6000908152600260205260409020546001600160a01b0316151590565b6102556102fb366004611514565b6105f7565b610204610650565b610224610316366004611514565b61065f565b6102556103293660046116a2565b61066a565b61024f6106b2565b600b546001600160a01b0316610224565b6102046106c6565b6102046106d5565b6102046106e4565b61024f61036d3660046116bd565b610772565b61020461077d565b61020461078a565b61024f6103903660046116f9565b610797565b6102046103a3366004611514565b6107ae565b61024f6103b6366004611775565b6107b9565b6102046107d5565b6101e76103d13660046117cc565b6107e4565b61024f6103e43660046116a2565b610812565b60006103f482610850565b92915050565b606060008054610409906117ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610435906117ff565b80156104825780601f1061045757610100808354040283529160200191610482565b820191906000526020600020905b81548152906001019060200180831161046557829003601f168201915b5050505050905090565b600061049782610875565b506000828152600460205260409020546001600160a01b03166103f4565b6104c08282336108ae565b5050565b6104cc6108bb565b6104c082826108e8565b6001600160a01b03821661050557604051633250574960e11b8152600060048201526024015b60405180910390fd5b6000610512838333610938565b9050836001600160a01b0316816001600160a01b031614610560576040516364283d7b60e01b81526001600160a01b03808616600483015260248201849052821660448201526064016104fc565b50505050565b60006105718361066a565b82106105a25760405163295f44f760e21b81526001600160a01b0384166004820152602481018390526044016104fc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6105e683838360405180602001604052806000815250610797565b505050565b6104c060008233610938565b600061060260095490565b821061062b5760405163295f44f760e21b815260006004820152602481018390526044016104fc565b6009828154811061063e5761063e611839565b90600052602060002001549050919050565b6060600d8054610409906117ff565b60006103f482610875565b60006001600160a01b038216610696576040516322718ad960e21b8152600060048201526024016104fc565b506001600160a01b031660009081526003602052604090205490565b6106ba6108bb565b6106c4600061094d565b565b6060600c8054610409906117ff565b606060018054610409906117ff565b600d80546106f1906117ff565b80601f016020809104026020016040519081016040528092919081815260200182805461071d906117ff565b801561076a5780601f1061073f5761010080835404028352916020019161076a565b820191906000526020600020905b81548152906001019060200180831161074d57829003601f168201915b505050505081565b6104c033838361099f565b600e80546106f1906117ff565b600c80546106f1906117ff565b6107a28484846104d6565b61056084848484610a3e565b60606103f482610b67565b6107c16108bb565b6107cb8383610c70565b6105e682826108e8565b6060600e8054610409906117ff565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61081a6108bb565b6001600160a01b03811661084457604051631e4fbdf760e01b8152600060048201526024016104fc565b61084d8161094d565b50565b60006001600160e01b0319821663780e9d6360e01b14806103f457506103f482610c8a565b6000818152600260205260408120546001600160a01b0316806103f457604051637e27328960e01b8152600481018490526024016104fc565b6105e68383836001610caf565b600b546001600160a01b031633146106c45760405163118cdaa760e01b81523360048201526024016104fc565b6000828152600660205260409020610900828261189f565b506040518281527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050565b6000610945848484610db5565b949350505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166109d157604051630b61174360e31b81526001600160a01b03831660048201526024016104fc565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b1561056057604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290610a8090339088908790879060040161195f565b6020604051808303816000875af1925050508015610abb575060408051601f3d908101601f19168201909252610ab89181019061199c565b60015b610b24573d808015610ae9576040519150601f19603f3d011682016040523d82523d6000602084013e610aee565b606091505b508051600003610b1c57604051633250574960e11b81526001600160a01b03851660048201526024016104fc565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14610b6057604051633250574960e11b81526001600160a01b03851660048201526024016104fc565b5050505050565b6060610b7282610875565b5060008281526006602052604081208054610b8c906117ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb8906117ff565b8015610c055780601f10610bda57610100808354040283529160200191610c05565b820191906000526020600020905b815481529060010190602001808311610be857829003601f168201915b505050505090506000610c2360408051602081019091526000815290565b90508051600003610c35575092915050565b815115610c67578082604051602001610c4f9291906119b9565b60405160208183030381529060405292505050919050565b61094584610e82565b6104c0828260405180602001604052806000815250610ef7565b60006001600160e01b03198216632483248360e11b14806103f457506103f482610f0e565b8080610cc357506001600160a01b03821615155b15610d85576000610cd384610875565b90506001600160a01b03831615801590610cff5750826001600160a01b0316816001600160a01b031614155b8015610d125750610d1081846107e4565b155b15610d3b5760405163a9fbf51f60e01b81526001600160a01b03841660048201526024016104fc565b8115610d835783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b600080610dc3858585610f5e565b90506001600160a01b038116610e2057610e1b84600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b610e43565b846001600160a01b0316816001600160a01b031614610e4357610e438185611057565b6001600160a01b038516610e5f57610e5a846110e8565b610945565b846001600160a01b0316816001600160a01b031614610945576109458585611197565b6060610e8d82610875565b506000610ea560408051602081019091526000815290565b90506000815111610ec55760405180602001604052806000815250610ef0565b80610ecf846111e7565b604051602001610ee09291906119b9565b6040516020818303038152906040525b9392505050565b610f01838361127a565b6105e66000848484610a3e565b60006001600160e01b031982166380ac58cd60e01b1480610f3f57506001600160e01b03198216635b5e139f60e01b145b806103f457506301ffc9a760e01b6001600160e01b03198316146103f4565b6000828152600260205260408120546001600160a01b0390811690831615610f8b57610f8b8184866112df565b6001600160a01b03811615610fc957610fa8600085600080610caf565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615610ff8576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b60006110628361066a565b6000838152600860205260409020549091508082146110b5576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906110fa906001906119e8565b6000838152600a60205260408120546009805493945090928490811061112257611122611839565b90600052602060002001549050806009838154811061114357611143611839565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061117b5761117b611a09565b6001900381819060005260206000200160009055905550505050565b600060016111a48461066a565b6111ae91906119e8565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b606060006111f483611343565b600101905060008167ffffffffffffffff81111561121457611214611573565b6040519080825280601f01601f19166020018201604052801561123e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461124857509392505050565b6001600160a01b0382166112a457604051633250574960e11b8152600060048201526024016104fc565b60006112b283836000610938565b90506001600160a01b038116156105e6576040516339e3563760e11b8152600060048201526024016104fc565b6112ea83838361141b565b6105e6576001600160a01b03831661131857604051637e27328960e01b8152600481018290526024016104fc565b60405163177e802f60e01b81526001600160a01b0383166004820152602481018290526044016104fc565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106113825772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106113ae576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106113cc57662386f26fc10000830492506010015b6305f5e10083106113e4576305f5e100830492506008015b61271083106113f857612710830492506004015b6064831061140a576064830492506002015b600a83106103f45760010192915050565b60006001600160a01b038316158015906109455750826001600160a01b0316846001600160a01b03161480611455575061145584846107e4565b806109455750506000908152600460205260409020546001600160a01b03908116911614919050565b6001600160e01b03198116811461084d57600080fd5b6000602082840312156114a657600080fd5b8135610ef08161147e565b60005b838110156114cc5781810151838201526020016114b4565b50506000910152565b600081518084526114ed8160208601602086016114b1565b601f01601f19169290920160200192915050565b602081526000610ef060208301846114d5565b60006020828403121561152657600080fd5b5035919050565b80356001600160a01b038116811461154457600080fd5b919050565b6000806040838503121561155c57600080fd5b6115658361152d565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156115a4576115a4611573565b604051601f8501601f19908116603f011681019082821181831017156115cc576115cc611573565b816040528093508581528686860111156115e557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261161057600080fd5b610ef083833560208501611589565b6000806040838503121561163257600080fd5b82359150602083013567ffffffffffffffff81111561165057600080fd5b61165c858286016115ff565b9150509250929050565b60008060006060848603121561167b57600080fd5b6116848461152d565b92506116926020850161152d565b9150604084013590509250925092565b6000602082840312156116b457600080fd5b610ef08261152d565b600080604083850312156116d057600080fd5b6116d98361152d565b9150602083013580151581146116ee57600080fd5b809150509250929050565b6000806000806080858703121561170f57600080fd5b6117188561152d565b93506117266020860161152d565b925060408501359150606085013567ffffffffffffffff81111561174957600080fd5b8501601f8101871361175a57600080fd5b61176987823560208401611589565b91505092959194509250565b60008060006060848603121561178a57600080fd5b6117938461152d565b925060208401359150604084013567ffffffffffffffff8111156117b657600080fd5b6117c2868287016115ff565b9150509250925092565b600080604083850312156117df57600080fd5b6117e88361152d565b91506117f66020840161152d565b90509250929050565b600181811c9082168061181357607f821691505b60208210810361183357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b601f8211156105e6576000816000526020600020601f850160051c810160208610156118785750805b601f850160051c820191505b8181101561189757828155600101611884565b505050505050565b815167ffffffffffffffff8111156118b9576118b9611573565b6118cd816118c784546117ff565b8461184f565b602080601f83116001811461190257600084156118ea5750858301515b600019600386901b1c1916600185901b178555611897565b600085815260208120601f198616915b8281101561193157888601518255948401946001909101908401611912565b508582101561194f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611992908301846114d5565b9695505050505050565b6000602082840312156119ae57600080fd5b8151610ef08161147e565b600083516119cb8184602088016114b1565b8351908301906119df8183602088016114b1565b01949350505050565b818103818111156103f457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea26469706673582212206ff38700c73b602455dbb7964f2d3281f62efc77263f0f3bdb67f5e4ee5d4f3f64736f6c63430008170033a2646970667358221220d058cf8dfb17169ff3320b4ba2cb9665d5f875cda19c5c22351f341d783cad4064736f6c63430008170033" From a58301c24d718a5a24c2334006991d8ba0c2b27f Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:12:10 -0500 Subject: [PATCH 3/7] update bridge admin txn --- ...im_accessor_capability_and_save_router.cdc | 31 +++++++++++----- .../claim_and_set_accessor_capability.cdc | 35 +++++++++++++++++++ 2 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 cadence/transactions/bridge/admin/claim_and_set_accessor_capability.cdc diff --git a/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc b/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc index 8ba00989..0eb78043 100644 --- a/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc +++ b/cadence/transactions/bridge/admin/claim_accessor_capability_and_save_router.cdc @@ -10,21 +10,34 @@ import "FlowEVMBridgeAccessor" /// transaction(name: String, provider: Address) { + let accessorCap: Capability + let routerRef: auth(EVM.Bridge) &{EVM.BridgeRouter} + prepare(signer: auth(BorrowValue, ClaimInboxCapability, SaveValue) &Account) { + let routerStoragePath = /storage/evmBridgeRouter + // Claim the BridgeAccessor Capability - let accessorCap = signer.inbox.claim(name, provider: provider) - ?? panic("BridgeAccessor Capability not found") + self.accessorCap = signer.inbox.claim( + name, + provider: provider + ) ?? panic("BridgeAccessor Capability not found") - // Ensure the Capability is valid - assert(accessorCap.check() == true, message: "Invalid BridgeAccessor Capability") + // Ensure the Capability is valid and nothing is stored where the BridgeRouter should be stored + assert(self.accessorCap.check() == true, message: "Invalid BridgeAccessor Capability") + assert( + signer.storage.type(at: routerStoragePath) == nil, + message: "Collision where BridgeRouter will be stored" + ) - // Create a Router to store the Capability and save the Router in storage - let router <- accessorCap.borrow()!.createBridgeRouter() - signer.storage.save(<-router, to: /storage/evmBridgeRouter) + let router <-self.accessorCap.borrow()!.createBridgeRouter() + signer.storage.save(<-router, to: routerStoragePath) // Borrow the router from storage and set the BridgeAccessor Capability - let routerRef = signer.storage.borrow(from: /storage/evmBridgeRouter) + self.routerRef = signer.storage.borrow(from: routerStoragePath) ?? panic("BridgeRouter not found in storage") - routerRef.setBridgeAccessor(accessorCap) + } + + execute { + self.routerRef.setBridgeAccessor(self.accessorCap) } } diff --git a/cadence/transactions/bridge/admin/claim_and_set_accessor_capability.cdc b/cadence/transactions/bridge/admin/claim_and_set_accessor_capability.cdc new file mode 100644 index 00000000..6babc518 --- /dev/null +++ b/cadence/transactions/bridge/admin/claim_and_set_accessor_capability.cdc @@ -0,0 +1,35 @@ +import "EVM" + +import "FlowEVMBridgeAccessor" + +/// This transaction is intended to be run by the EVM contract account after FlowEVMBridgeAccessor.BridgeAccessor in the +/// event the BridgeAccessor Capability needs to be reset within the store BridgeRouter. Within this transacion, the +/// prepare block assumes a BridgeRouter is already stored at /storage/evmBridgeRouter. +/// +/// @param name: The name of the BridgeAccessor Capability to claim +/// @param provider: The address of the account that published the BridgeAccessor Capability +/// +transaction(name: String, provider: Address) { + + let accessorCap: Capability + let router: auth(EVM.Bridge) &{EVM.BridgeRouter} + + prepare(signer: auth(BorrowValue, ClaimInboxCapability, SaveValue) &Account) { + // Claim the BridgeAccessor Capability + self.accessorCap = signer.inbox.claim( + name, + provider: provider + ) ?? panic("BridgeAccessor Capability not found") + + // Ensure the Capability is valid + assert(self.accessorCap.check() == true, message: "Invalid BridgeAccessor Capability") + + // Borrow the router from storage and set the BridgeAccessor Capability + self.router = signer.storage.borrow(from: /storage/evmBridgeRouter) + ?? panic("BridgeRouter not found in storage") + } + + execute { + self.router.setBridgeAccessor(self.accessorCap) + } +} From 35b1d676b0a6db2f33a1a9b0d7306aab1f9f5130 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:31:13 -0500 Subject: [PATCH 4/7] add .codecov.yml to exclude dependency and test contracts --- .codecov.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..b84b0c0b --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,15 @@ +ignore: +- "./cadence/contracts/example-assets/*" +- "./cadence/contracts/utils/ArrayUtils.cdc" +- "./cadence/contracts/utils/StringUtils.cdc" +- "./cadence/contracts/utils/ScopedFTProvider.cdc" +- "./cadence/contracts/standards/Burner.cdc" +- "./cadence/contracts/standards/FlowStorageFees.cdc" +- "./cadence/contracts/standards/FlowToken.cdc" +- "./cadence/contracts/standards/FungibleToken.cdc" +- "./cadence/contracts/standards/FungibleTokenMetadataViews.cdc" +- "./cadence/contracts/standards/NonFungibleToken.cdc" +- "./cadence/contracts/standards/ViewResolver.cdc" +- "./cadence/contracts/templates/emulator/*" +- "./cadence/contracts/templates/previewnet/*" +- "./cadence/contracts/test/*" \ No newline at end of file From 1721fe618b6ed94b5de67a79c3b5371739e38fb6 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:43:47 -0500 Subject: [PATCH 5/7] update .gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11ad135a..f3e7cf8d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ coverage.lcov # Keys *.pkey -*.pem \ No newline at end of file +*.pem + +# Local configs +local.flow.json \ No newline at end of file From 01d398813a8990945450be6a2474cf4dd5f7c5a2 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:22:42 -0500 Subject: [PATCH 6/7] add FlowEVMBridgeAccessor to flow.json previewnet deployment --- flow.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flow.json b/flow.json index a771547f..d5d003f8 100644 --- a/flow.json +++ b/flow.json @@ -348,7 +348,16 @@ "IEVMBridgeTokenMinter", "IFlowEVMNFTBridge", "IFlowEVMTokenBridge", - "FlowEVMBridge" + "FlowEVMBridge", + { + "name": "FlowEVMBridgeAccessor", + "args": [ + { + "type": "Address", + "value": "0xb6763b4399a888c8" + } + ] + } ] } } From b69b9079e56bf2a9df39832423cf031f96b96a96 Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:38:40 -0500 Subject: [PATCH 7/7] update NFT standard and ExampleNFT implementation --- .../contracts/example-assets/ExampleNFT.cdc | 4 +-- .../contracts/standards/NonFungibleToken.cdc | 26 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/cadence/contracts/example-assets/ExampleNFT.cdc b/cadence/contracts/example-assets/ExampleNFT.cdc index 61f57017..9cfab633 100644 --- a/cadence/contracts/example-assets/ExampleNFT.cdc +++ b/cadence/contracts/example-assets/ExampleNFT.cdc @@ -123,7 +123,7 @@ access(all) contract ExampleNFT: NonFungibleToken { access(all) resource Collection: NonFungibleToken.Collection { /// dictionary of NFT conforming tokens /// NFT is a resource type with an `UInt64` ID field - access(contract) var ownedNFTs: @{UInt64: ExampleNFT.NFT} + access(all) var ownedNFTs: @{UInt64: {NonFungibleToken.NFT}} access(all) var storagePath: StoragePath access(all) var publicPath: PublicPath @@ -187,7 +187,7 @@ access(all) contract ExampleNFT: NonFungibleToken { /// Borrow the view resolver for the specified NFT ID access(all) view fun borrowViewResolver(id: UInt64): &{ViewResolver.Resolver}? { - if let nft = &self.ownedNFTs[id] as &ExampleNFT.NFT? { + if let nft = &self.ownedNFTs[id] as &{NonFungibleToken.NFT}? { return nft as &{ViewResolver.Resolver} } return nil diff --git a/cadence/contracts/standards/NonFungibleToken.cdc b/cadence/contracts/standards/NonFungibleToken.cdc index 1eba76ed..bf6d5f8a 100644 --- a/cadence/contracts/standards/NonFungibleToken.cdc +++ b/cadence/contracts/standards/NonFungibleToken.cdc @@ -36,7 +36,7 @@ Collection to complete the transfer. */ -import ViewResolver from "ViewResolver" +import "ViewResolver" /// The main NFT contract. Other NFT contracts will /// import and implement the interfaces defined in this contract @@ -63,7 +63,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { /// and query the updated metadata from the owners' collections. /// access(all) event Updated(type: String, id: UInt64, uuid: UInt64, owner: Address?) - access(contract) view fun emitNFTUpdated(_ nftRef: auth(Update | Owner) &{NonFungibleToken.NFT}) + access(all) view fun emitNFTUpdated(_ nftRef: auth(Update | Owner) &{NonFungibleToken.NFT}) { emit Updated(type: nftRef.getType().identifier, id: nftRef.id, uuid: nftRef.uuid, owner: nftRef.owner?.address) } @@ -85,9 +85,6 @@ access(all) contract interface NonFungibleToken: ViewResolver { /// access(all) event Deposited(type: String, id: UInt64, uuid: UInt64, to: Address?, collectionUUID: UInt64) - /// Included for backwards-compatibility - access(all) resource interface INFT: NFT {} - /// Interface that the NFTs must conform to /// access(all) resource interface NFT: ViewResolver.Resolver { @@ -105,6 +102,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { access(all) fun createEmptyCollection(): @{Collection} { post { result.getLength() == 0: "The created collection must be empty!" + result.isSupportedNFTType(type: self.getType()): "The created collection must support this NFT type" } } @@ -174,6 +172,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { access(all) fun deposit(token: @{NFT}) access(all) view fun getLength(): Int access(all) view fun getIDs(): [UInt64] + access(all) fun forEachID(_ f: fun (UInt64): Bool): Void access(all) view fun borrowNFT(_ id: UInt64): &{NFT}? } @@ -182,6 +181,10 @@ access(all) contract interface NonFungibleToken: ViewResolver { /// access(all) resource interface Collection: Provider, Receiver, CollectionPublic, ViewResolver.ResolverCollection { + /// Cadence allows implementing types to specify less restrictive access + /// so implementing contracts can have this as `access(all)` with no problem + access(contract) var ownedNFTs: @{UInt64: {NonFungibleToken.NFT}} + /// deposit takes a NFT as an argument and stores it in the collection /// @param token: The NFT to deposit into the collection access(all) fun deposit(token: @{NonFungibleToken.NFT}) { @@ -196,7 +199,16 @@ access(all) contract interface NonFungibleToken: ViewResolver { /// Gets the amount of NFTs stored in the collection /// @return An integer indicating the size of the collection - access(all) view fun getLength(): Int + access(all) view fun getLength(): Int { + return self.ownedNFTs.length + } + + /// Allows a given function to iterate through the list + /// of owned NFT IDs in a collection without first + /// having to load the entire list into memory + access(all) fun forEachID(_ f: fun (UInt64): Bool): Void { + self.ownedNFTs.forEachKey(f) + } /// Borrows a reference to an NFT stored in the collection /// If the NFT with the specified ID is not in the collection, @@ -231,4 +243,4 @@ access(all) contract interface NonFungibleToken: ViewResolver { result.getIDs().length == 0: "The created collection must be empty!" } } -} +} \ No newline at end of file