@@ -55,18 +55,15 @@ func New(ctx context.Context, config *params.SystemContractConfig, client sync_s
55
55
return systemContract
56
56
}
57
57
58
- // Hardcoded ABI snippet for getAllTransitions ():
58
+ // Hardcoded ABI snippet for getSigners ():
59
59
//
60
- // function getAllTransitions() external view returns (uint64[] memory, address[] memory);
61
- //
62
- // We only need what's necessary to encode/decode "getAllTransitions".
63
- const getAllTransitionsABI = `[
60
+ // function getSigners() external view returns (uint64[] memory, address[] memory);
61
+ const getSignersABI = `[
64
62
{
65
63
"inputs": [],
66
- "name": "getAllTransitions ",
64
+ "name": "getSigners ",
67
65
"outputs": [
68
- {"internalType": "uint64[]", "type": "uint64[]"},
69
- {"internalType": "address[]","type": "address[]"}
66
+ { "internalType": "address[]", "type": "address[]" }
70
67
],
71
68
"stateMutability": "view",
72
69
"type": "function"
@@ -77,13 +74,13 @@ const getAllTransitionsABI = `[
77
74
// and returns them as a slice of [StartBlock, Signer].
78
75
func (s * SystemContract ) fetchAllSigners (blockNum * big.Int ) ([]SignerAddressL1 , error ) {
79
76
// Parse the ABI so we can encode and decode calls
80
- parsedABI , err := abi .JSON (strings .NewReader (getAllTransitionsABI ))
77
+ parsedABI , err := abi .JSON (strings .NewReader (getSignersABI ))
81
78
if err != nil {
82
79
return nil , fmt .Errorf ("parse ABI error: %w" , err )
83
80
}
84
81
85
82
// Pack the function call data
86
- packed , err := parsedABI .Pack ("getAllTransitions " )
83
+ packed , err := parsedABI .Pack ("getSigners " )
87
84
if err != nil {
88
85
return nil , fmt .Errorf ("ABI pack error: %w" , err )
89
86
}
@@ -104,7 +101,7 @@ func (s *SystemContract) fetchAllSigners(blockNum *big.Int) ([]SignerAddressL1,
104
101
Blocks []* big.Int
105
102
Signers []common.Address
106
103
}
107
- err = parsedABI .UnpackIntoInterface (& ret , "getAllTransitions " , output )
104
+ err = parsedABI .UnpackIntoInterface (& ret , "getSigners " , output )
108
105
if err != nil {
109
106
return nil , fmt .Errorf ("unpack error: %w" , err )
110
107
}
0 commit comments