MCPcopy Create free account
hub / github.com/circlefin/arc-node / maybeUpgrade

Function maybeUpgrade

tests/simulation/NativeFiatToken.test.ts:145–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143 * Returns upgrade call if NEW_IMPLEMENTATION_ADDRESS is set, empty array otherwise
144 */
145 const maybeUpgrade = () => {
146 const newImpl = getNewImplementation()
147 const admin = genesisConfig?.NativeFiatToken?.proxy?.admin
148
149 if (newImpl && admin) {
150 return [
151 {
152 account: admin,
153 to: PROXY_ADDRESS,
154 abi: parseAbi(['function upgradeTo(address)']),
155 functionName: 'upgradeTo',
156 args: [newImpl],
157 },
158 ]
159 }
160 return []
161 }
162
163 const getCallIndexOffset = () => maybeUpgrade().length
164

Callers 2

getCallIndexOffsetFunction · 0.85

Calls 1

getNewImplementationFunction · 0.70

Tested by

no test coverage detected