moneytrackio / tezart

Tezart helps to interact with ​Tezos blockchain.
https://moneytrackio.github.io/tezart/
MIT License
26 stars 16 forks source link

How to run the example with public Tezos node? #101

Open songproducer opened 1 year ago

songproducer commented 1 year ago

I'm getting this error when I run dart example/example.dart:

TezartNodeError: got code unhandled with msg `Unhandled error: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = localhost, port = 58596.`
#0      catchHttpError (package:tezart/src/core/rpc/impl/tezart_http_error.dart:54:5)
<asynchronous suspension>
#1      main (file:///Users/leotreasure/tezart/example/example.dart:71:26)
<asynchronous suspension>
songproducer commented 1 year ago

I changed localhost:20000 to 127.0.0.1:8732

but now get this error:

Unhandled exception:
type 'Null' is not a subtype of type 'String' in type cast
#0      OperationLimitsSetterVisitor._simulationConsumedGas (package:tezart/src/models/operation/impl/operation_limits_setter_visitor.dart:38:99)
#1      OperationLimitsSetterVisitor._gasLimitFromConsumed (package:tezart/src/models/operation/impl/operation_limits_setter_visitor.dart:34:13)
#2      OperationLimitsSetterVisitor.visit (package:tezart/src/models/operation/impl/operation_limits_setter_visitor.dart:12:54)
#3      Operation.setLimits (package:tezart/src/models/operation/impl/operation.dart:115:19)
#4      OperationsList.setLimits.<anonymous closure> (package:tezart/src/models/operations_list/impl/operations_list.dart:188:23)
#5      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#6      ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#7      Future.wait (dart:async/future.dart:523:26)
#8      OperationsList.setLimits (package:tezart/src/models/operations_list/impl/operations_list.dart:187:18)
#9      OperationsList.computeLimits (package:tezart/src/models/operations_list/impl/operations_list.dart:152:11)
<asynchronous suspension>
#10     OperationsList.estimate (package:tezart/src/models/operations_list/impl/operations_list.dart:144:5)
<asynchronous suspension>
#11     OperationsList.execute.<anonymous closure> (package:tezart/src/models/operations_list/impl/operations_list.dart:124:7)
<asynchronous suspension>
#12     RetryOptions.retry (package:retry/retry.dart:131:16)
<asynchronous suspension>
#13     OperationsList.execute (package:tezart/src/models/operations_list/impl/operations_list.dart:123:5)
<asynchronous suspension>
#14     OperationsList.executeAndMonitor (package:tezart/src/models/operations_list/impl/operations_list.dart:115:5)
<asynchronous suspension>
#15     main (file:///Users/leotreasure/tezart/example/example.dart:76:3)
<asynchronous suspension>