coinbase-sdk 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coinbase/address.rb +22 -3
  3. data/lib/coinbase/address_reputation.rb +67 -0
  4. data/lib/coinbase/client/api/addresses_api.rb +10 -10
  5. data/lib/coinbase/client/api/assets_api.rb +2 -2
  6. data/lib/coinbase/client/api/balance_history_api.rb +2 -2
  7. data/lib/coinbase/client/api/contract_events_api.rb +2 -2
  8. data/lib/coinbase/client/api/contract_invocations_api.rb +5 -5
  9. data/lib/coinbase/client/api/external_addresses_api.rb +246 -5
  10. data/lib/coinbase/client/api/fund_api.rb +5 -5
  11. data/lib/coinbase/client/api/mpc_wallet_stake_api.rb +4 -4
  12. data/lib/coinbase/client/api/networks_api.rb +2 -2
  13. data/lib/coinbase/client/api/onchain_identity_api.rb +2 -2
  14. data/lib/coinbase/client/api/reputation_api.rb +2 -71
  15. data/lib/coinbase/client/api/server_signers_api.rb +7 -7
  16. data/lib/coinbase/client/api/smart_contracts_api.rb +169 -26
  17. data/lib/coinbase/client/api/stake_api.rb +8 -8
  18. data/lib/coinbase/client/api/trades_api.rb +5 -5
  19. data/lib/coinbase/client/api/transaction_history_api.rb +2 -2
  20. data/lib/coinbase/client/api/transfers_api.rb +14 -14
  21. data/lib/coinbase/client/api/users_api.rb +1 -1
  22. data/lib/coinbase/client/api/wallets_api.rb +6 -6
  23. data/lib/coinbase/client/api/webhooks_api.rb +6 -6
  24. data/lib/coinbase/client/api_client.rb +1 -1
  25. data/lib/coinbase/client/api_error.rb +1 -1
  26. data/lib/coinbase/client/configuration.rb +15 -1
  27. data/lib/coinbase/client/models/address.rb +1 -1
  28. data/lib/coinbase/client/models/address_balance_list.rb +1 -1
  29. data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
  30. data/lib/coinbase/client/models/address_list.rb +1 -1
  31. data/lib/coinbase/client/models/address_reputation.rb +16 -9
  32. data/lib/coinbase/client/models/address_reputation_metadata.rb +1 -1
  33. data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
  34. data/lib/coinbase/client/models/asset.rb +1 -1
  35. data/lib/coinbase/client/models/balance.rb +1 -1
  36. data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
  37. data/lib/coinbase/client/models/{broadcast_transfer_request.rb → broadcast_external_transfer_request.rb} +4 -4
  38. data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
  39. data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
  40. data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
  41. data/lib/coinbase/client/models/contract_event.rb +1 -1
  42. data/lib/coinbase/client/models/contract_event_list.rb +1 -1
  43. data/lib/coinbase/client/models/contract_invocation.rb +1 -1
  44. data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
  45. data/lib/coinbase/client/models/create_address_request.rb +1 -1
  46. data/lib/coinbase/client/models/create_contract_invocation_request.rb +1 -1
  47. data/lib/coinbase/client/models/create_external_transfer_request.rb +273 -0
  48. data/lib/coinbase/client/models/create_fund_operation_request.rb +2 -2
  49. data/lib/coinbase/client/models/create_fund_quote_request.rb +2 -2
  50. data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
  51. data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
  52. data/lib/coinbase/client/models/create_smart_contract_request.rb +1 -1
  53. data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
  54. data/lib/coinbase/client/models/create_trade_request.rb +1 -1
  55. data/lib/coinbase/client/models/create_transfer_request.rb +2 -2
  56. data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
  57. data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
  58. data/lib/coinbase/client/models/create_wallet_webhook_request.rb +1 -1
  59. data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
  60. data/lib/coinbase/client/models/crypto_amount.rb +1 -1
  61. data/lib/coinbase/client/models/deploy_smart_contract_request.rb +1 -1
  62. data/lib/coinbase/client/models/erc20_transfer_event.rb +1 -1
  63. data/lib/coinbase/client/models/erc721_transfer_event.rb +1 -1
  64. data/lib/coinbase/client/models/error.rb +1 -1
  65. data/lib/coinbase/client/models/ethereum_token_transfer.rb +1 -1
  66. data/lib/coinbase/client/models/ethereum_transaction.rb +15 -5
  67. data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
  68. data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
  69. data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
  70. data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
  71. data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
  72. data/lib/coinbase/client/models/feature_set.rb +1 -1
  73. data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
  74. data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
  75. data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
  76. data/lib/coinbase/client/models/fiat_amount.rb +1 -1
  77. data/lib/coinbase/client/models/fund_operation.rb +1 -1
  78. data/lib/coinbase/client/models/fund_operation_fees.rb +1 -1
  79. data/lib/coinbase/client/models/fund_operation_list.rb +1 -1
  80. data/lib/coinbase/client/models/fund_quote.rb +1 -1
  81. data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
  82. data/lib/coinbase/client/models/historical_balance.rb +1 -1
  83. data/lib/coinbase/client/models/multi_token_contract_options.rb +1 -1
  84. data/lib/coinbase/client/models/network.rb +1 -1
  85. data/lib/coinbase/client/models/network_identifier.rb +1 -1
  86. data/lib/coinbase/client/models/nft_contract_options.rb +1 -1
  87. data/lib/coinbase/client/models/onchain_name.rb +1 -1
  88. data/lib/coinbase/client/models/onchain_name_list.rb +1 -1
  89. data/lib/coinbase/client/models/payload_signature.rb +1 -1
  90. data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
  91. data/lib/coinbase/client/models/read_contract_request.rb +1 -1
  92. data/lib/coinbase/client/models/register_smart_contract_request.rb +252 -0
  93. data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
  94. data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
  95. data/lib/coinbase/client/models/server_signer.rb +1 -1
  96. data/lib/coinbase/client/models/server_signer_event.rb +1 -1
  97. data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
  98. data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
  99. data/lib/coinbase/client/models/server_signer_list.rb +1 -1
  100. data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
  101. data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
  102. data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
  103. data/lib/coinbase/client/models/smart_contract.rb +37 -31
  104. data/lib/coinbase/client/models/smart_contract_activity_event.rb +386 -0
  105. data/lib/coinbase/client/models/smart_contract_list.rb +1 -1
  106. data/lib/coinbase/client/models/smart_contract_options.rb +1 -1
  107. data/lib/coinbase/client/models/smart_contract_type.rb +3 -2
  108. data/lib/coinbase/client/models/solidity_value.rb +1 -1
  109. data/lib/coinbase/client/models/sponsored_send.rb +1 -1
  110. data/lib/coinbase/client/models/staking_balance.rb +1 -1
  111. data/lib/coinbase/client/models/staking_context.rb +1 -1
  112. data/lib/coinbase/client/models/staking_context_context.rb +1 -1
  113. data/lib/coinbase/client/models/staking_operation.rb +1 -1
  114. data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
  115. data/lib/coinbase/client/models/staking_reward.rb +1 -1
  116. data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
  117. data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
  118. data/lib/coinbase/client/models/token_contract_options.rb +1 -1
  119. data/lib/coinbase/client/models/token_transfer_type.rb +1 -1
  120. data/lib/coinbase/client/models/trade.rb +1 -1
  121. data/lib/coinbase/client/models/trade_list.rb +1 -1
  122. data/lib/coinbase/client/models/transaction.rb +1 -1
  123. data/lib/coinbase/client/models/transaction_content.rb +1 -1
  124. data/lib/coinbase/client/models/transaction_type.rb +1 -1
  125. data/lib/coinbase/client/models/transfer.rb +2 -37
  126. data/lib/coinbase/client/models/transfer_list.rb +1 -1
  127. data/lib/coinbase/client/models/update_smart_contract_request.rb +245 -0
  128. data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
  129. data/lib/coinbase/client/models/user.rb +1 -1
  130. data/lib/coinbase/client/models/validator.rb +1 -1
  131. data/lib/coinbase/client/models/validator_details.rb +1 -1
  132. data/lib/coinbase/client/models/validator_list.rb +1 -1
  133. data/lib/coinbase/client/models/validator_status.rb +1 -1
  134. data/lib/coinbase/client/models/wallet.rb +1 -1
  135. data/lib/coinbase/client/models/wallet_list.rb +1 -1
  136. data/lib/coinbase/client/models/webhook.rb +1 -1
  137. data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
  138. data/lib/coinbase/client/models/webhook_event_type.rb +3 -2
  139. data/lib/coinbase/client/models/webhook_event_type_filter.rb +2 -1
  140. data/lib/coinbase/client/models/webhook_list.rb +1 -1
  141. data/lib/coinbase/client/models/{address_risk.rb → webhook_smart_contract_event_filter.rb} +19 -17
  142. data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +8 -1
  143. data/lib/coinbase/client/version.rb +1 -1
  144. data/lib/coinbase/client.rb +7 -3
  145. data/lib/coinbase/errors.rb +8 -0
  146. data/lib/coinbase/smart_contract.rb +338 -245
  147. data/lib/coinbase/version.rb +1 -1
  148. data/lib/coinbase/wallet/data.rb +6 -4
  149. data/lib/coinbase/wallet.rb +3 -2
  150. data/lib/coinbase.rb +2 -1
  151. metadata +12 -7
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Coinbase Platform API
3
+
4
+ #This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs.
5
+
6
+ The version of the OpenAPI document: 0.0.1-alpha
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Coinbase::Client
17
+ # Smart Contract data to be registered
18
+ class RegisterSmartContractRequest
19
+ # ABI of the smart contract
20
+ attr_accessor :abi
21
+
22
+ # Name of the smart contract
23
+ attr_accessor :contract_name
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'abi' => :'abi',
29
+ :'contract_name' => :'contract_name'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'abi' => :'String',
42
+ :'contract_name' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Coinbase::Client::RegisterSmartContractRequest` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Coinbase::Client::RegisterSmartContractRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'abi')
68
+ self.abi = attributes[:'abi']
69
+ else
70
+ self.abi = nil
71
+ end
72
+
73
+ if attributes.key?(:'contract_name')
74
+ self.contract_name = attributes[:'contract_name']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
82
+ invalid_properties = Array.new
83
+ if @abi.nil?
84
+ invalid_properties.push('invalid value for "abi", abi cannot be nil.')
85
+ end
86
+
87
+ if !@contract_name.nil? && @contract_name.to_s.length > 100
88
+ invalid_properties.push('invalid value for "contract_name", the character length must be smaller than or equal to 100.')
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
+ return false if @abi.nil?
99
+ return false if !@contract_name.nil? && @contract_name.to_s.length > 100
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] contract_name Value to be assigned
105
+ def contract_name=(contract_name)
106
+ if contract_name.nil?
107
+ fail ArgumentError, 'contract_name cannot be nil'
108
+ end
109
+
110
+ if contract_name.to_s.length > 100
111
+ fail ArgumentError, 'invalid value for "contract_name", the character length must be smaller than or equal to 100.'
112
+ end
113
+
114
+ @contract_name = contract_name
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ abi == o.abi &&
123
+ contract_name == o.contract_name
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [abi, contract_name].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def self._deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = Coinbase::Client.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.0.1-alpha
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -16,19 +16,22 @@ require 'time'
16
16
  module Coinbase::Client
17
17
  # Represents a smart contract on the blockchain
18
18
  class SmartContract
19
- # The unique identifier of the smart contract
19
+ # The unique identifier of the smart contract.
20
20
  attr_accessor :smart_contract_id
21
21
 
22
22
  # The name of the blockchain network
23
23
  attr_accessor :network_id
24
24
 
25
- # The ID of the wallet that deployed the smart contract
25
+ # The ID of the wallet that deployed the smart contract. If this smart contract was deployed externally, this will be omitted.
26
26
  attr_accessor :wallet_id
27
27
 
28
28
  # The EVM address of the smart contract
29
29
  attr_accessor :contract_address
30
30
 
31
- # The EVM address of the account that deployed the smart contract
31
+ # The name of the smart contract
32
+ attr_accessor :contract_name
33
+
34
+ # The EVM address of the account that deployed the smart contract. If this smart contract was deployed externally, this will be omitted.
32
35
  attr_accessor :deployer_address
33
36
 
34
37
  attr_accessor :type
@@ -40,6 +43,9 @@ module Coinbase::Client
40
43
 
41
44
  attr_accessor :transaction
42
45
 
46
+ # Whether the smart contract was deployed externally. If true, the deployer_address and transaction will be omitted.
47
+ attr_accessor :is_external
48
+
43
49
  class EnumAttributeValidator
44
50
  attr_reader :datatype
45
51
  attr_reader :allowable_values
@@ -69,11 +75,13 @@ module Coinbase::Client
69
75
  :'network_id' => :'network_id',
70
76
  :'wallet_id' => :'wallet_id',
71
77
  :'contract_address' => :'contract_address',
78
+ :'contract_name' => :'contract_name',
72
79
  :'deployer_address' => :'deployer_address',
73
80
  :'type' => :'type',
74
81
  :'options' => :'options',
75
82
  :'abi' => :'abi',
76
- :'transaction' => :'transaction'
83
+ :'transaction' => :'transaction',
84
+ :'is_external' => :'is_external'
77
85
  }
78
86
  end
79
87
 
@@ -89,11 +97,13 @@ module Coinbase::Client
89
97
  :'network_id' => :'String',
90
98
  :'wallet_id' => :'String',
91
99
  :'contract_address' => :'String',
100
+ :'contract_name' => :'String',
92
101
  :'deployer_address' => :'String',
93
102
  :'type' => :'SmartContractType',
94
103
  :'options' => :'SmartContractOptions',
95
104
  :'abi' => :'String',
96
- :'transaction' => :'Transaction'
105
+ :'transaction' => :'Transaction',
106
+ :'is_external' => :'Boolean'
97
107
  }
98
108
  end
99
109
 
@@ -132,8 +142,6 @@ module Coinbase::Client
132
142
 
133
143
  if attributes.key?(:'wallet_id')
134
144
  self.wallet_id = attributes[:'wallet_id']
135
- else
136
- self.wallet_id = nil
137
145
  end
138
146
 
139
147
  if attributes.key?(:'contract_address')
@@ -142,10 +150,14 @@ module Coinbase::Client
142
150
  self.contract_address = nil
143
151
  end
144
152
 
153
+ if attributes.key?(:'contract_name')
154
+ self.contract_name = attributes[:'contract_name']
155
+ else
156
+ self.contract_name = nil
157
+ end
158
+
145
159
  if attributes.key?(:'deployer_address')
146
160
  self.deployer_address = attributes[:'deployer_address']
147
- else
148
- self.deployer_address = nil
149
161
  end
150
162
 
151
163
  if attributes.key?(:'type')
@@ -156,8 +168,6 @@ module Coinbase::Client
156
168
 
157
169
  if attributes.key?(:'options')
158
170
  self.options = attributes[:'options']
159
- else
160
- self.options = nil
161
171
  end
162
172
 
163
173
  if attributes.key?(:'abi')
@@ -168,8 +178,12 @@ module Coinbase::Client
168
178
 
169
179
  if attributes.key?(:'transaction')
170
180
  self.transaction = attributes[:'transaction']
181
+ end
182
+
183
+ if attributes.key?(:'is_external')
184
+ self.is_external = attributes[:'is_external']
171
185
  else
172
- self.transaction = nil
186
+ self.is_external = nil
173
187
  end
174
188
  end
175
189
 
@@ -186,32 +200,24 @@ module Coinbase::Client
186
200
  invalid_properties.push('invalid value for "network_id", network_id cannot be nil.')
187
201
  end
188
202
 
189
- if @wallet_id.nil?
190
- invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.')
191
- end
192
-
193
203
  if @contract_address.nil?
194
204
  invalid_properties.push('invalid value for "contract_address", contract_address cannot be nil.')
195
205
  end
196
206
 
197
- if @deployer_address.nil?
198
- invalid_properties.push('invalid value for "deployer_address", deployer_address cannot be nil.')
207
+ if @contract_name.nil?
208
+ invalid_properties.push('invalid value for "contract_name", contract_name cannot be nil.')
199
209
  end
200
210
 
201
211
  if @type.nil?
202
212
  invalid_properties.push('invalid value for "type", type cannot be nil.')
203
213
  end
204
214
 
205
- if @options.nil?
206
- invalid_properties.push('invalid value for "options", options cannot be nil.')
207
- end
208
-
209
215
  if @abi.nil?
210
216
  invalid_properties.push('invalid value for "abi", abi cannot be nil.')
211
217
  end
212
218
 
213
- if @transaction.nil?
214
- invalid_properties.push('invalid value for "transaction", transaction cannot be nil.')
219
+ if @is_external.nil?
220
+ invalid_properties.push('invalid value for "is_external", is_external cannot be nil.')
215
221
  end
216
222
 
217
223
  invalid_properties
@@ -223,13 +229,11 @@ module Coinbase::Client
223
229
  warn '[DEPRECATED] the `valid?` method is obsolete'
224
230
  return false if @smart_contract_id.nil?
225
231
  return false if @network_id.nil?
226
- return false if @wallet_id.nil?
227
232
  return false if @contract_address.nil?
228
- return false if @deployer_address.nil?
233
+ return false if @contract_name.nil?
229
234
  return false if @type.nil?
230
- return false if @options.nil?
231
235
  return false if @abi.nil?
232
- return false if @transaction.nil?
236
+ return false if @is_external.nil?
233
237
  true
234
238
  end
235
239
 
@@ -242,11 +246,13 @@ module Coinbase::Client
242
246
  network_id == o.network_id &&
243
247
  wallet_id == o.wallet_id &&
244
248
  contract_address == o.contract_address &&
249
+ contract_name == o.contract_name &&
245
250
  deployer_address == o.deployer_address &&
246
251
  type == o.type &&
247
252
  options == o.options &&
248
253
  abi == o.abi &&
249
- transaction == o.transaction
254
+ transaction == o.transaction &&
255
+ is_external == o.is_external
250
256
  end
251
257
 
252
258
  # @see the `==` method
@@ -258,7 +264,7 @@ module Coinbase::Client
258
264
  # Calculates hash code according to all attributes.
259
265
  # @return [Integer] Hash code
260
266
  def hash
261
- [smart_contract_id, network_id, wallet_id, contract_address, deployer_address, type, options, abi, transaction].hash
267
+ [smart_contract_id, network_id, wallet_id, contract_address, contract_name, deployer_address, type, options, abi, transaction, is_external].hash
262
268
  end
263
269
 
264
270
  # Builds the object from hash