@@ -5,104 +5,104 @@ import { StyledTd } from "./Table";
5
5
6
6
const ENTROPY_V2_ABI = [
7
7
{
8
- " inputs" : [ ] ,
9
- " name" : "getDefaultProvider" ,
10
- " outputs" : [
8
+ inputs : [ ] ,
9
+ name : "getDefaultProvider" ,
10
+ outputs : [
11
11
{
12
- " internalType" : "address" ,
13
- " name" : "provider" ,
14
- " type" : "address"
15
- }
12
+ internalType : "address" ,
13
+ name : "provider" ,
14
+ type : "address" ,
15
+ } ,
16
16
] ,
17
- " stateMutability" : "view" ,
18
- " type" : "function"
17
+ stateMutability : "view" ,
18
+ type : "function" ,
19
19
} ,
20
20
{
21
- " inputs" : [
21
+ inputs : [
22
22
{
23
- " internalType" : "address" ,
24
- " name" : "provider" ,
25
- " type" : "address"
26
- }
23
+ internalType : "address" ,
24
+ name : "provider" ,
25
+ type : "address" ,
26
+ } ,
27
27
] ,
28
- " name" : "getProviderInfoV2" ,
29
- " outputs" : [
28
+ name : "getProviderInfoV2" ,
29
+ outputs : [
30
30
{
31
- " components" : [
31
+ components : [
32
32
{
33
- " internalType" : "uint128" ,
34
- " name" : "feeInWei" ,
35
- " type" : "uint128"
33
+ internalType : "uint128" ,
34
+ name : "feeInWei" ,
35
+ type : "uint128" ,
36
36
} ,
37
37
{
38
- " internalType" : "uint128" ,
39
- " name" : "accruedFeesInWei" ,
40
- " type" : "uint128"
38
+ internalType : "uint128" ,
39
+ name : "accruedFeesInWei" ,
40
+ type : "uint128" ,
41
41
} ,
42
42
{
43
- " internalType" : "bytes32" ,
44
- " name" : "originalCommitment" ,
45
- " type" : "bytes32"
43
+ internalType : "bytes32" ,
44
+ name : "originalCommitment" ,
45
+ type : "bytes32" ,
46
46
} ,
47
47
{
48
- " internalType" : "uint64" ,
49
- " name" : "originalCommitmentSequenceNumber" ,
50
- " type" : "uint64"
48
+ internalType : "uint64" ,
49
+ name : "originalCommitmentSequenceNumber" ,
50
+ type : "uint64" ,
51
51
} ,
52
52
{
53
- " internalType" : "bytes" ,
54
- " name" : "commitmentMetadata" ,
55
- " type" : "bytes"
53
+ internalType : "bytes" ,
54
+ name : "commitmentMetadata" ,
55
+ type : "bytes" ,
56
56
} ,
57
57
{
58
- " internalType" : "bytes" ,
59
- " name" : "uri" ,
60
- " type" : "bytes"
58
+ internalType : "bytes" ,
59
+ name : "uri" ,
60
+ type : "bytes" ,
61
61
} ,
62
62
{
63
- " internalType" : "uint64" ,
64
- " name" : "endSequenceNumber" ,
65
- " type" : "uint64"
63
+ internalType : "uint64" ,
64
+ name : "endSequenceNumber" ,
65
+ type : "uint64" ,
66
66
} ,
67
67
{
68
- " internalType" : "uint64" ,
69
- " name" : "sequenceNumber" ,
70
- " type" : "uint64"
68
+ internalType : "uint64" ,
69
+ name : "sequenceNumber" ,
70
+ type : "uint64" ,
71
71
} ,
72
72
{
73
- " internalType" : "bytes32" ,
74
- " name" : "currentCommitment" ,
75
- " type" : "bytes32"
73
+ internalType : "bytes32" ,
74
+ name : "currentCommitment" ,
75
+ type : "bytes32" ,
76
76
} ,
77
77
{
78
- " internalType" : "uint64" ,
79
- " name" : "currentCommitmentSequenceNumber" ,
80
- " type" : "uint64"
78
+ internalType : "uint64" ,
79
+ name : "currentCommitmentSequenceNumber" ,
80
+ type : "uint64" ,
81
81
} ,
82
82
{
83
- " internalType" : "address" ,
84
- " name" : "feeManager" ,
85
- " type" : "address"
83
+ internalType : "address" ,
84
+ name : "feeManager" ,
85
+ type : "address" ,
86
86
} ,
87
87
{
88
- " internalType" : "bool" ,
89
- " name" : "withCallback" ,
90
- " type" : "bool"
88
+ internalType : "bool" ,
89
+ name : "withCallback" ,
90
+ type : "bool" ,
91
91
} ,
92
92
{
93
- " internalType" : "uint32" ,
94
- " name" : "defaultGasLimit" ,
95
- " type" : "uint32"
96
- }
93
+ internalType : "uint32" ,
94
+ name : "defaultGasLimit" ,
95
+ type : "uint32" ,
96
+ } ,
97
97
] ,
98
- " internalType" : "struct EntropyStructsV2.ProviderInfo" ,
99
- " name" : "info" ,
100
- " type" : "tuple"
101
- }
98
+ internalType : "struct EntropyStructsV2.ProviderInfo" ,
99
+ name : "info" ,
100
+ type : "tuple" ,
101
+ } ,
102
102
] ,
103
- " stateMutability" : "view" ,
104
- " type" : "function"
105
- }
103
+ stateMutability : "view" ,
104
+ type : "function" ,
105
+ } ,
106
106
] ;
107
107
108
108
const EntropyDeploymentTable = ( {
@@ -123,20 +123,32 @@ const EntropyDeploymentTable = ({
123
123
ENTROPY_V2_ABI ,
124
124
ethers . getDefaultProvider ( deployment . rpc )
125
125
) ;
126
- contract . getDefaultProvider ( ) . then ( ( defaultProvider : string ) => {
127
- contract
128
- . getProviderInfoV2 ( defaultProvider )
129
- . then ( ( providerInfo : any ) => {
130
- const gasLimit = providerInfo . defaultGasLimit ;
131
- const formattedGasLimit = gasLimit . toString ( ) ;
132
- setGasLimits ( ( prev ) => ( { ...prev , [ name ] : formattedGasLimit } ) ) ;
133
- } )
134
- . catch ( ( ) => {
135
- setGasLimits ( ( prev ) => ( { ...prev , [ name ] : deployment . gasLimit } ) ) ;
136
- } ) ;
137
- } ) . catch ( ( ) => {
138
- setGasLimits ( ( prev ) => ( { ...prev , [ name ] : deployment . gasLimit } ) ) ;
139
- } ) ;
126
+ contract
127
+ . getDefaultProvider ( )
128
+ . then ( ( defaultProvider : string ) => {
129
+ contract
130
+ . getProviderInfoV2 ( defaultProvider )
131
+ . then ( ( providerInfo : any ) => {
132
+ const gasLimit = providerInfo . defaultGasLimit ;
133
+ const formattedGasLimit = gasLimit . toString ( ) ;
134
+ setGasLimits ( ( prev ) => ( {
135
+ ...prev ,
136
+ [ name ] : formattedGasLimit ,
137
+ } ) ) ;
138
+ } )
139
+ . catch ( ( ) => {
140
+ setGasLimits ( ( prev ) => ( {
141
+ ...prev ,
142
+ [ name ] : deployment . gasLimit ,
143
+ } ) ) ;
144
+ } ) ;
145
+ } )
146
+ . catch ( ( ) => {
147
+ setGasLimits ( ( prev ) => ( {
148
+ ...prev ,
149
+ [ name ] : deployment . gasLimit ,
150
+ } ) ) ;
151
+ } ) ;
140
152
} catch {
141
153
setGasLimits ( ( prev ) => ( { ...prev , [ name ] : deployment . gasLimit } ) ) ;
142
154
}
0 commit comments