11package aptosconfig
22
33import (
4- "github.com/smartcontractkit/chainlink-aptos/relayer/chainreader/config"
54 "github.com/smartcontractkit/chainlink-ccip/pkg/consts"
5+ "github.com/smartcontractkit/chainlink-common/pkg/types/aptos"
66)
77
8- func GetChainReaderConfig () (config. ChainReaderConfig , error ) {
9- return config. ChainReaderConfig {
8+ func GetChainReaderConfig () (aptos. ContractReaderConfig , error ) {
9+ return aptos. ContractReaderConfig {
1010 IsLoopPlugin : true ,
11- Modules : map [string ]* config. ChainReaderModule {
11+ Modules : map [string ]* aptos. ContractReaderModule {
1212 consts .ContractNameRMNRemote : {
1313 Name : "rmn_remote" ,
14- Functions : map [string ]* config. ChainReaderFunction {
14+ Functions : map [string ]* aptos. ContractReaderFunction {
1515 consts .MethodNameGetReportDigestHeader : {
1616 Name : "get_report_digest_header" ,
1717 },
@@ -27,18 +27,18 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
2727 },
2828 consts .ContractNameRMNProxy : {
2929 Name : "rmn_remote" ,
30- Functions : map [string ]* config. ChainReaderFunction {
30+ Functions : map [string ]* aptos. ContractReaderFunction {
3131 consts .MethodNameGetARM : {
3232 Name : "get_arm" ,
3333 },
3434 },
3535 },
3636 consts .ContractNameFeeQuoter : {
3737 Name : "fee_quoter" ,
38- Functions : map [string ]* config. ChainReaderFunction {
38+ Functions : map [string ]* aptos. ContractReaderFunction {
3939 consts .MethodNameFeeQuoterGetTokenPrice : {
4040 Name : "get_token_price" ,
41- Params : []config. AptosFunctionParam {
41+ Params : []aptos. FunctionParam {
4242 {
4343 Name : "token" ,
4444 Type : "address" ,
@@ -48,7 +48,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
4848 },
4949 consts .MethodNameFeeQuoterGetTokenPrices : {
5050 Name : "get_token_prices" ,
51- Params : []config. AptosFunctionParam {
51+ Params : []aptos. FunctionParam {
5252 {
5353 Name : "tokens" ,
5454 Type : "vector<address>" ,
@@ -61,7 +61,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
6161 },
6262 consts .MethodNameGetFeePriceUpdate : {
6363 Name : "get_dest_chain_gas_price" ,
64- Params : []config. AptosFunctionParam {
64+ Params : []aptos. FunctionParam {
6565 {
6666 Name : "destChainSelector" ,
6767 Type : "u64" ,
@@ -73,10 +73,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
7373 },
7474 consts .ContractNameOffRamp : {
7575 Name : "offramp" ,
76- Functions : map [string ]* config. ChainReaderFunction {
76+ Functions : map [string ]* aptos. ContractReaderFunction {
7777 consts .MethodNameGetExecutionState : {
7878 Name : "get_execution_state" ,
79- Params : []config. AptosFunctionParam {
79+ Params : []aptos. FunctionParam {
8080 {
8181 Name : "sourceChainSelector" ,
8282 Type : "u64" ,
@@ -91,7 +91,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
9191 },
9292 consts .MethodNameGetMerkleRoot : {
9393 Name : "get_merkle_root" ,
94- Params : []config. AptosFunctionParam {
94+ Params : []aptos. FunctionParam {
9595 {
9696 Name : "root" ,
9797 Type : "vector<u8>" ,
@@ -101,7 +101,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
101101 },
102102 consts .MethodNameOffRampLatestConfigDetails : {
103103 Name : "latest_config_details" ,
104- Params : []config. AptosFunctionParam {
104+ Params : []aptos. FunctionParam {
105105 {
106106 Name : "ocrPluginType" ,
107107 Type : "u8" ,
@@ -123,7 +123,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
123123 },
124124 consts .MethodNameGetSourceChainConfig : {
125125 Name : "get_source_chain_config" ,
126- Params : []config. AptosFunctionParam {
126+ Params : []aptos. FunctionParam {
127127 {
128128 Name : "sourceChainSelector" ,
129129 Type : "u64" ,
@@ -132,12 +132,12 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
132132 },
133133 },
134134 },
135- Events : map [string ]* config. ChainReaderEvent {
135+ Events : map [string ]* aptos. ContractReaderEvent {
136136 consts .EventNameExecutionStateChanged : {
137137 EventHandleStructName : "OffRampState" ,
138138 EventHandleFieldName : "execution_state_changed_events" ,
139139 EventAccountAddress : "offramp::get_state_address" ,
140- EventFieldRenames : map [string ]config .RenamedField {
140+ EventFieldRenames : map [string ]aptos .RenamedField {
141141 "source_chain_selector" : {
142142 NewName : "SourceChainSelector" ,
143143 },
@@ -162,10 +162,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
162162 EventHandleStructName : "OffRampState" ,
163163 EventHandleFieldName : "commit_report_accepted_events" ,
164164 EventAccountAddress : "offramp::get_state_address" ,
165- EventFieldRenames : map [string ]config .RenamedField {
165+ EventFieldRenames : map [string ]aptos .RenamedField {
166166 "blessed_merkle_roots" : {
167167 NewName : "BlessedMerkleRoots" ,
168- SubFieldRenames : map [string ]config .RenamedField {
168+ SubFieldRenames : map [string ]aptos .RenamedField {
169169 "source_chain_selector" : {
170170 NewName : "SourceChainSelector" ,
171171 },
@@ -185,7 +185,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
185185 },
186186 "unblessed_merkle_roots" : {
187187 NewName : "UnblessedMerkleRoots" ,
188- SubFieldRenames : map [string ]config .RenamedField {
188+ SubFieldRenames : map [string ]aptos .RenamedField {
189189 "source_chain_selector" : {
190190 NewName : "SourceChainSelector" ,
191191 },
@@ -205,10 +205,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
205205 },
206206 "price_updates" : {
207207 NewName : "PriceUpdates" ,
208- SubFieldRenames : map [string ]config .RenamedField {
208+ SubFieldRenames : map [string ]aptos .RenamedField {
209209 "token_price_updates" : {
210210 NewName : "TokenPriceUpdates" ,
211- SubFieldRenames : map [string ]config .RenamedField {
211+ SubFieldRenames : map [string ]aptos .RenamedField {
212212 "source_token" : {
213213 NewName : "SourceToken" ,
214214 },
@@ -219,7 +219,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
219219 },
220220 "gas_price_updates" : {
221221 NewName : "GasPriceUpdates" ,
222- SubFieldRenames : map [string ]config .RenamedField {
222+ SubFieldRenames : map [string ]aptos .RenamedField {
223223 "dest_chain_selector" : {
224224 NewName : "DestChainSelector" ,
225225 },
@@ -236,7 +236,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
236236 EventHandleStructName : "OffRampState" ,
237237 EventHandleFieldName : "ocr3_base_state.config_set_events" ,
238238 EventAccountAddress : "offramp::get_state_address" ,
239- EventFieldRenames : map [string ]config .RenamedField {
239+ EventFieldRenames : map [string ]aptos .RenamedField {
240240 "ocr_plugin_type" : {
241241 NewName : "OcrPluginType" ,
242242 },
@@ -258,13 +258,13 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
258258 EventHandleStructName : "OffRampState" ,
259259 EventHandleFieldName : "source_chain_config_set_events" ,
260260 EventAccountAddress : "offramp::get_state_address" ,
261- EventFieldRenames : map [string ]config .RenamedField {
261+ EventFieldRenames : map [string ]aptos .RenamedField {
262262 "source_chain_selector" : {
263263 NewName : "SourceChainSelector" ,
264264 },
265265 "source_chain_config" : {
266266 NewName : "SourceChainConfig" ,
267- SubFieldRenames : map [string ]config .RenamedField {
267+ SubFieldRenames : map [string ]aptos .RenamedField {
268268 "router" : {NewName : "Router" },
269269 "is_enabled" : {NewName : "IsEnabled" },
270270 "min_seq_nr" : {NewName : "MinSeqNr" },
@@ -278,7 +278,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
278278 },
279279 consts .ContractNameOnRamp : {
280280 Name : "onramp" ,
281- Functions : map [string ]* config. ChainReaderFunction {
281+ Functions : map [string ]* aptos. ContractReaderFunction {
282282 consts .MethodNameOnRampGetDynamicConfig : {
283283 Name : "get_dynamic_config" ,
284284 },
@@ -287,7 +287,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
287287 },
288288 consts .MethodNameOnRampGetDestChainConfig : {
289289 Name : "get_dest_chain_config" ,
290- Params : []config. AptosFunctionParam {
290+ Params : []aptos. FunctionParam {
291291 {
292292 Name : "destChainSelector" ,
293293 Type : "u64" ,
@@ -298,7 +298,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
298298 },
299299 consts .MethodNameGetExpectedNextSequenceNumber : {
300300 Name : "get_expected_next_sequence_number" ,
301- Params : []config. AptosFunctionParam {
301+ Params : []aptos. FunctionParam {
302302 {
303303 Name : "destChainSelector" ,
304304 Type : "u64" ,
@@ -307,12 +307,12 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
307307 },
308308 },
309309 },
310- Events : map [string ]* config. ChainReaderEvent {
310+ Events : map [string ]* aptos. ContractReaderEvent {
311311 consts .EventNameCCIPMessageSent : {
312312 EventHandleStructName : "OnRampState" ,
313313 EventHandleFieldName : "ccip_message_sent_events" ,
314314 EventAccountAddress : "onramp::get_state_address" ,
315- EventFieldRenames : map [string ]config .RenamedField {
315+ EventFieldRenames : map [string ]aptos .RenamedField {
316316 "dest_chain_selector" : {
317317 NewName : "DestChainSelector" ,
318318 SubFieldRenames : nil ,
@@ -323,10 +323,10 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
323323 },
324324 "message" : {
325325 NewName : "Message" ,
326- SubFieldRenames : map [string ]config .RenamedField {
326+ SubFieldRenames : map [string ]aptos .RenamedField {
327327 "header" : {
328328 NewName : "Header" ,
329- SubFieldRenames : map [string ]config .RenamedField {
329+ SubFieldRenames : map [string ]aptos .RenamedField {
330330 "source_chain_selector" : {
331331 NewName : "SourceChainSelector" ,
332332 },
@@ -367,7 +367,7 @@ func GetChainReaderConfig() (config.ChainReaderConfig, error) {
367367 },
368368 "token_amounts" : {
369369 NewName : "TokenAmounts" ,
370- SubFieldRenames : map [string ]config .RenamedField {
370+ SubFieldRenames : map [string ]aptos .RenamedField {
371371 "source_pool_address" : {
372372 NewName : "SourcePoolAddress" ,
373373 },
0 commit comments