@@ -3,17 +3,17 @@ package aptosconfig
33import (
44 "time"
55
6- "github.com/smartcontractkit/chainlink-aptos/relayer/chainreader/config"
76 "github.com/smartcontractkit/chainlink-ccip/pkg/consts"
7+ "github.com/smartcontractkit/chainlink-common/pkg/types/aptos"
88)
99
10- func GetChainReaderConfig () (config .ChainReaderConfig , error ) {
11- return config .ChainReaderConfig {
10+ func GetChainReaderConfig () (aptos .ChainReaderConfig , error ) {
11+ return aptos .ChainReaderConfig {
1212 IsLoopPlugin : true ,
13- Modules : map [string ]* config .ChainReaderModule {
13+ Modules : map [string ]* aptos .ChainReaderModule {
1414 consts .ContractNameRMNRemote : {
1515 Name : "rmn_remote" ,
16- Functions : map [string ]* config .ChainReaderFunction {
16+ Functions : map [string ]* aptos .ChainReaderFunction {
1717 consts .MethodNameGetReportDigestHeader : {
1818 Name : "get_report_digest_header" ,
1919 },
@@ -29,18 +29,18 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
2929 },
3030 consts .ContractNameRMNProxy : {
3131 Name : "rmn_remote" ,
32- Functions : map [string ]* config .ChainReaderFunction {
32+ Functions : map [string ]* aptos .ChainReaderFunction {
3333 consts .MethodNameGetARM : {
3434 Name : "get_arm" ,
3535 },
3636 },
3737 },
3838 consts .ContractNameFeeQuoter : {
3939 Name : "fee_quoter" ,
40- Functions : map [string ]* config .ChainReaderFunction {
40+ Functions : map [string ]* aptos .ChainReaderFunction {
4141 consts .MethodNameFeeQuoterGetTokenPrice : {
4242 Name : "get_token_price" ,
43- Params : []config. AptosFunctionParam {
43+ Params : []aptos. FunctionParam {
4444 {
4545 Name : "token" ,
4646 Type : "address" ,
@@ -50,7 +50,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
5050 },
5151 consts .MethodNameFeeQuoterGetTokenPrices : {
5252 Name : "get_token_prices" ,
53- Params : []config. AptosFunctionParam {
53+ Params : []aptos. FunctionParam {
5454 {
5555 Name : "tokens" ,
5656 Type : "vector<address>" ,
@@ -63,7 +63,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
6363 },
6464 consts .MethodNameGetFeePriceUpdate : {
6565 Name : "get_dest_chain_gas_price" ,
66- Params : []config. AptosFunctionParam {
66+ Params : []aptos. FunctionParam {
6767 {
6868 Name : "destChainSelector" ,
6969 Type : "u64" ,
@@ -75,10 +75,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
7575 },
7676 consts .ContractNameOffRamp : {
7777 Name : "offramp" ,
78- Functions : map [string ]* config .ChainReaderFunction {
78+ Functions : map [string ]* aptos .ChainReaderFunction {
7979 consts .MethodNameGetExecutionState : {
8080 Name : "get_execution_state" ,
81- Params : []config. AptosFunctionParam {
81+ Params : []aptos. FunctionParam {
8282 {
8383 Name : "sourceChainSelector" ,
8484 Type : "u64" ,
@@ -93,7 +93,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
9393 },
9494 consts .MethodNameGetMerkleRoot : {
9595 Name : "get_merkle_root" ,
96- Params : []config. AptosFunctionParam {
96+ Params : []aptos. FunctionParam {
9797 {
9898 Name : "root" ,
9999 Type : "vector<u8>" ,
@@ -103,7 +103,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
103103 },
104104 consts .MethodNameOffRampLatestConfigDetails : {
105105 Name : "latest_config_details" ,
106- Params : []config. AptosFunctionParam {
106+ Params : []aptos. FunctionParam {
107107 {
108108 Name : "ocrPluginType" ,
109109 Type : "u8" ,
@@ -125,7 +125,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
125125 },
126126 consts .MethodNameGetSourceChainConfig : {
127127 Name : "get_source_chain_config" ,
128- Params : []config. AptosFunctionParam {
128+ Params : []aptos. FunctionParam {
129129 {
130130 Name : "sourceChainSelector" ,
131131 Type : "u64" ,
@@ -134,12 +134,12 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
134134 },
135135 },
136136 },
137- Events : map [string ]* config .ChainReaderEvent {
137+ Events : map [string ]* aptos .ChainReaderEvent {
138138 consts .EventNameExecutionStateChanged : {
139139 EventHandleStructName : "OffRampState" ,
140140 EventHandleFieldName : "execution_state_changed_events" ,
141141 EventAccountAddress : "offramp::get_state_address" ,
142- EventFieldRenames : map [string ]config .RenamedField {
142+ EventFieldRenames : map [string ]aptos .RenamedField {
143143 "source_chain_selector" : {
144144 NewName : "SourceChainSelector" ,
145145 },
@@ -161,10 +161,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
161161 EventHandleStructName : "OffRampState" ,
162162 EventHandleFieldName : "commit_report_accepted_events" ,
163163 EventAccountAddress : "offramp::get_state_address" ,
164- EventFieldRenames : map [string ]config .RenamedField {
164+ EventFieldRenames : map [string ]aptos .RenamedField {
165165 "blessed_merkle_roots" : {
166166 NewName : "BlessedMerkleRoots" ,
167- SubFieldRenames : map [string ]config .RenamedField {
167+ SubFieldRenames : map [string ]aptos .RenamedField {
168168 "source_chain_selector" : {
169169 NewName : "SourceChainSelector" ,
170170 },
@@ -184,7 +184,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
184184 },
185185 "unblessed_merkle_roots" : {
186186 NewName : "UnblessedMerkleRoots" ,
187- SubFieldRenames : map [string ]config .RenamedField {
187+ SubFieldRenames : map [string ]aptos .RenamedField {
188188 "source_chain_selector" : {
189189 NewName : "SourceChainSelector" ,
190190 },
@@ -204,10 +204,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
204204 },
205205 "price_updates" : {
206206 NewName : "PriceUpdates" ,
207- SubFieldRenames : map [string ]config .RenamedField {
207+ SubFieldRenames : map [string ]aptos .RenamedField {
208208 "token_price_updates" : {
209209 NewName : "TokenPriceUpdates" ,
210- SubFieldRenames : map [string ]config .RenamedField {
210+ SubFieldRenames : map [string ]aptos .RenamedField {
211211 "source_token" : {
212212 NewName : "SourceToken" ,
213213 },
@@ -218,7 +218,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
218218 },
219219 "gas_price_updates" : {
220220 NewName : "GasPriceUpdates" ,
221- SubFieldRenames : map [string ]config .RenamedField {
221+ SubFieldRenames : map [string ]aptos .RenamedField {
222222 "dest_chain_selector" : {
223223 NewName : "DestChainSelector" ,
224224 },
@@ -235,7 +235,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
235235 EventHandleStructName : "OffRampState" ,
236236 EventHandleFieldName : "ocr3_base_state.config_set_events" ,
237237 EventAccountAddress : "offramp::get_state_address" ,
238- EventFieldRenames : map [string ]config .RenamedField {
238+ EventFieldRenames : map [string ]aptos .RenamedField {
239239 "ocr_plugin_type" : {
240240 NewName : "OcrPluginType" ,
241241 },
@@ -257,13 +257,13 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
257257 EventHandleStructName : "OffRampState" ,
258258 EventHandleFieldName : "source_chain_config_set_events" ,
259259 EventAccountAddress : "offramp::get_state_address" ,
260- EventFieldRenames : map [string ]config .RenamedField {
260+ EventFieldRenames : map [string ]aptos .RenamedField {
261261 "source_chain_selector" : {
262262 NewName : "SourceChainSelector" ,
263263 },
264264 "source_chain_config" : {
265265 NewName : "SourceChainConfig" ,
266- SubFieldRenames : map [string ]config .RenamedField {
266+ SubFieldRenames : map [string ]aptos .RenamedField {
267267 "router" : {NewName : "Router" },
268268 "is_enabled" : {NewName : "IsEnabled" },
269269 "min_seq_nr" : {NewName : "MinSeqNr" },
@@ -277,7 +277,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
277277 },
278278 consts .ContractNameOnRamp : {
279279 Name : "onramp" ,
280- Functions : map [string ]* config .ChainReaderFunction {
280+ Functions : map [string ]* aptos .ChainReaderFunction {
281281 consts .MethodNameOnRampGetDynamicConfig : {
282282 Name : "get_dynamic_config" ,
283283 },
@@ -286,7 +286,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
286286 },
287287 consts .MethodNameOnRampGetDestChainConfig : {
288288 Name : "get_dest_chain_config" ,
289- Params : []config. AptosFunctionParam {
289+ Params : []aptos. FunctionParam {
290290 {
291291 Name : "destChainSelector" ,
292292 Type : "u64" ,
@@ -297,7 +297,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
297297 },
298298 consts .MethodNameGetExpectedNextSequenceNumber : {
299299 Name : "get_expected_next_sequence_number" ,
300- Params : []config. AptosFunctionParam {
300+ Params : []aptos. FunctionParam {
301301 {
302302 Name : "destChainSelector" ,
303303 Type : "u64" ,
@@ -306,12 +306,12 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
306306 },
307307 },
308308 },
309- Events : map [string ]* config .ChainReaderEvent {
309+ Events : map [string ]* aptos .ChainReaderEvent {
310310 consts .EventNameCCIPMessageSent : {
311311 EventHandleStructName : "OnRampState" ,
312312 EventHandleFieldName : "ccip_message_sent_events" ,
313313 EventAccountAddress : "onramp::get_state_address" ,
314- EventFieldRenames : map [string ]config .RenamedField {
314+ EventFieldRenames : map [string ]aptos .RenamedField {
315315 "dest_chain_selector" : {
316316 NewName : "DestChainSelector" ,
317317 SubFieldRenames : nil ,
@@ -322,10 +322,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
322322 },
323323 "message" : {
324324 NewName : "Message" ,
325- SubFieldRenames : map [string ]config .RenamedField {
325+ SubFieldRenames : map [string ]aptos .RenamedField {
326326 "header" : {
327327 NewName : "Header" ,
328- SubFieldRenames : map [string ]config .RenamedField {
328+ SubFieldRenames : map [string ]aptos .RenamedField {
329329 "source_chain_selector" : {
330330 NewName : "SourceChainSelector" ,
331331 },
@@ -366,7 +366,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
366366 },
367367 "token_amounts" : {
368368 NewName : "TokenAmounts" ,
369- SubFieldRenames : map [string ]config .RenamedField {
369+ SubFieldRenames : map [string ]aptos .RenamedField {
370370 "source_pool_address" : {
371371 NewName : "SourcePoolAddress" ,
372372 },
0 commit comments