@@ -15,10 +15,6 @@ import {
1515 DEPLOYED_ADDRESS as TOFU_DECIMALS_ADDRESS,
1616 RUNTIME_CODE as TOFU_DECIMALS_RUNTIME_CODE
1717} from "rain-tofu-erc20-decimals-deploy-0.1.3/src/generated/0_1_0/TOFUTokenDecimals.sol " ;
18- import {
19- DEPLOYED_ADDRESS as META_BOARD_ADDRESS,
20- RUNTIME_CODE as META_BOARD_RUNTIME_CODE
21- } from "rain-metadata-deploy-0.1.3/src/generated/0_1_1/MetaBoard.sol " ;
2218import {
2319 CREATION_CODE as RAINDEX_CREATION_CODE_CANDIDATE,
2420 RUNTIME_CODE as RAINDEX_RUNTIME_CODE_CANDIDATE
@@ -73,14 +69,52 @@ abstract contract RaindexDeploySuites is RainDeploySuitesBase {
7369 return candidates;
7470 }
7571
76- /// The code that must already be on a network before `RaindexV6` or
77- /// `RaindexV6SubParser` can be broadcast there: the TOFU decimals reader
78- /// and the metaboard.
72+ /// The TOFU decimals reader, which `RaindexV6` and every arb read token
73+ /// decimals through.
74+ /// @return The dependency.
75+ function tofuDecimalsDependency () internal pure returns (DeployDependency memory ) {
76+ return DeployDependency ({deployedAddress: TOFU_DECIMALS_ADDRESS, runtimeCode: TOFU_DECIMALS_RUNTIME_CODE});
77+ }
78+
79+ /// The candidate `RaindexV6`, the only raindex every arb accepts.
80+ /// @return The dependency.
81+ function raindexDependency () internal pure returns (DeployDependency memory ) {
82+ return DeployDependency ({
83+ deployedAddress: LibRaindexDeploy.RAINDEX_DEPLOYED_ADDRESS, runtimeCode: RAINDEX_RUNTIME_CODE_CANDIDATE
84+ });
85+ }
86+
87+ /// The code that must already be on a network before an arb can be
88+ /// broadcast there: the raindex it takes orders from and the TOFU
89+ /// decimals reader.
7990 /// @return The dependencies.
80- function raindexDependencies () internal pure returns (DeployDependency[] memory ) {
91+ function arbDependencies () internal pure returns (DeployDependency[] memory ) {
8192 DeployDependency[] memory deps = new DeployDependency [](2 );
82- deps[0 ] = DeployDependency ({deployedAddress: TOFU_DECIMALS_ADDRESS, runtimeCode: TOFU_DECIMALS_RUNTIME_CODE});
83- deps[1 ] = DeployDependency ({deployedAddress: META_BOARD_ADDRESS, runtimeCode: META_BOARD_RUNTIME_CODE});
93+ deps[0 ] = raindexDependency ();
94+ deps[1 ] = tofuDecimalsDependency ();
95+ return deps;
96+ }
97+
98+ /// `arbDependencies` plus the `RouteProcessor4` candidate the arb swaps
99+ /// through.
100+ /// @return The dependencies.
101+ function routeProcessorArbDependencies () internal pure returns (DeployDependency[] memory ) {
102+ DeployDependency[] memory deps = new DeployDependency [](3 );
103+ deps[0 ] = raindexDependency ();
104+ deps[1 ] = tofuDecimalsDependency ();
105+ deps[2 ] = DeployDependency ({
106+ deployedAddress: LibRaindexDeploy.ROUTE_PROCESSOR_DEPLOYED_ADDRESS,
107+ runtimeCode: ROUTE_PROCESSOR_RUNTIME_CODE_CANDIDATE
108+ });
109+ return deps;
110+ }
111+
112+ /// The code that must already be on a network before `RaindexV6` can be
113+ /// broadcast there: the TOFU decimals reader.
114+ /// @return The dependencies.
115+ function raindexDependencies () internal pure returns (DeployDependency[] memory ) {
116+ DeployDependency[] memory deps = new DeployDependency [](1 );
117+ deps[0 ] = tofuDecimalsDependency ();
84118 return deps;
85119 }
86120
@@ -118,7 +152,7 @@ abstract contract RaindexDeploySuites is RainDeploySuitesBase {
118152 storedBytecodeHash: LibRaindexDeploy.SUB_PARSER_DEPLOYED_CODEHASH,
119153 storedRuntimeCode: SUB_PARSER_RUNTIME_CODE_CANDIDATE,
120154 artifactPath: "src/concrete/parser/RaindexV6SubParser.sol:RaindexV6SubParser " ,
121- dependencies: raindexDependencies ( ),
155+ dependencies: new DeployDependency []( 0 ),
122156 mechanism: DeployMechanism.Zoltu,
123157 mechanismData: ""
124158 }),
@@ -159,7 +193,7 @@ abstract contract RaindexDeploySuites is RainDeploySuitesBase {
159193 storedBytecodeHash: LibRaindexDeploy.GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_CODEHASH,
160194 storedRuntimeCode: GENERIC_POOL_ARB_OT_RUNTIME_CODE_CANDIDATE,
161195 artifactPath: "src/concrete/arb/GenericPoolRaindexV6ArbOrderTaker.sol:GenericPoolRaindexV6ArbOrderTaker " ,
162- dependencies: new DeployDependency []( 0 ),
196+ dependencies: arbDependencies ( ),
163197 mechanism: DeployMechanism.Zoltu,
164198 mechanismData: ""
165199 }),
@@ -178,7 +212,7 @@ abstract contract RaindexDeploySuites is RainDeploySuitesBase {
178212 storedBytecodeHash: LibRaindexDeploy.ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_CODEHASH,
179213 storedRuntimeCode: RP_ARB_OT_RUNTIME_CODE_CANDIDATE,
180214 artifactPath: "src/concrete/arb/RouteProcessorRaindexV6ArbOrderTaker.sol:RouteProcessorRaindexV6ArbOrderTaker " ,
181- dependencies: new DeployDependency []( 0 ),
215+ dependencies: routeProcessorArbDependencies ( ),
182216 mechanism: DeployMechanism.Zoltu,
183217 mechanismData: ""
184218 }),
@@ -197,7 +231,7 @@ abstract contract RaindexDeploySuites is RainDeploySuitesBase {
197231 storedBytecodeHash: LibRaindexDeploy.GENERIC_POOL_FLASH_BORROWER_DEPLOYED_CODEHASH,
198232 storedRuntimeCode: GENERIC_POOL_FB_RUNTIME_CODE_CANDIDATE,
199233 artifactPath: "src/concrete/arb/GenericPoolRaindexV6FlashBorrower.sol:GenericPoolRaindexV6FlashBorrower " ,
200- dependencies: new DeployDependency []( 0 ),
234+ dependencies: arbDependencies ( ),
201235 mechanism: DeployMechanism.Zoltu,
202236 mechanismData: ""
203237 }),
0 commit comments