Skip to content

Commit 756817b

Browse files
committed
v3.8.0
- Update dependencies.
1 parent 25cdb79 commit 756817b

File tree

64 files changed

+704
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+704
-263
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.8.0
2+
3+
- Update dependencies.
4+
15
## 3.7.0
26

37
- Update dependencies.

example/lib/example/solana/token_program/create_mint_example.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ void main() async {
66
final freezeAuthority = QuickWalletForTest(index: 1112);
77
final mintAccount = QuickWalletForTest(index: 1111);
88
final mintAccSpace = SolanaMintAccount.size;
9+
910
final rent = await QuickWalletForTest.rpc
1011
.request(SolanaRPCGetMinimumBalanceForRentExemption(size: mintAccSpace));
1112
final createAccount = SystemProgram.createAccount(

example/test/widget_test.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
void main() async {}
1+
void main() async {
2+
// /// WebSocket RPC Service
3+
// final websocketRpc = await RPCWebSocketService.connect(
4+
// "wss://go.getblock.io/b9c91d92aaeb4e5ba2d4cca664ab708c", onEvents: (p0) {
5+
// print("on event $p0");
6+
// }, onClose: (p0) {});
7+
// // Establish a WebSocket RPC connection to the specified endpoint for real-time updates.
8+
9+
// /// Ethereum RPC
10+
// final rpc = EVMRPC(websocketRpc);
11+
12+
// final getblock = await rpc.request(RPCETHSubscribe());
13+
// print("block $getblock");
14+
// Timer.periodic(const Duration(seconds: 5), (s) async {
15+
// // final re = await rpc.request(RPCETHSubscribe());
16+
// // print("re $re");
17+
// });
18+
// print("get block $getblock");
19+
// final changed = await Future.delayed(const Duration(seconds: 60));
20+
}

lib/ada/src/models/certificate/types/pool/pool_params.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class PoolParams with ADASerialization {
7272
.toList(),
7373
poolMetadata: cbor
7474
.getIndex<CborListValue?>(8)
75-
?.to<PoolMetadata, CborListValue>((e) => PoolMetadata.deserialize(e)),
75+
?.castTo<PoolMetadata, CborListValue>(
76+
(e) => PoolMetadata.deserialize(e)),
7677
);
7778
}
7879
PoolParams copyWith({

lib/ada/src/models/certificate/types/pool/relay/relays/single_host_address.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class SingleHostAddr extends Relay {
2525
port: cbor.getIndex<CborIntValue?>(1)?.value,
2626
ipv4: cbor
2727
.getIndex<CborBytesValue?>(2)
28-
?.to<Ipv4, CborBytesValue>((e) => Ipv4.deserialize(e)),
28+
?.castTo<Ipv4, CborBytesValue>((e) => Ipv4.deserialize(e)),
2929
ipv6: cbor
3030
.getIndex<CborBytesValue?>(3)
31-
?.to<Ipv6, CborBytesValue>((e) => Ipv6.deserialize(e)),
31+
?.castTo<Ipv6, CborBytesValue>((e) => Ipv6.deserialize(e)),
3232
);
3333
}
3434

lib/ada/src/models/header/header/header_body.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class HeaderBody with ADASerialization {
5151
cbor.sublist(operationIndex, operationIndex + 4)),
5252
prevHash: cbor
5353
.getIndex<CborObject?>(2)
54-
?.to<BlockHash, CborBytesValue>((e) => BlockHash.deserialize(e)),
54+
?.castTo<BlockHash, CborBytesValue>(
55+
(e) => BlockHash.deserialize(e)),
5556
protocolVersion:
5657
ProtocolVersion.deserialize(cbor.sublist(protocolVersionIndex)),
5758
vrfvKey: VRFVKey.deserialize(cbor.getIndex(4)));

lib/ada/src/models/transaction/output/models/transaction_output.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ class TransactionOutput with ADASerialization {
4949
amount: Value.deserialize(cbor.getIndex<CborObject>(1)),
5050
plutusData: cbor
5151
.getIndex<CborObject?>(2)
52-
?.to<DataOption, CborObject>((e) => DataOption.deserialize(e)),
52+
?.castTo<DataOption, CborObject>(
53+
(e) => DataOption.deserialize(e)),
5354
scriptRef: cbor
5455
.getIndex<CborObject?>(3)
55-
?.to<ScriptRef, CborListValue>((e) => ScriptRef.deserialize(e)));
56+
?.castTo<ScriptRef, CborListValue>(
57+
(e) => ScriptRef.deserialize(e)));
5658
}
5759
final CborMapValue<CborObject, CborObject> cborMap = cbor.cast();
5860
final address =
@@ -62,10 +64,10 @@ class TransactionOutput with ADASerialization {
6264
amount: Value.deserialize(cborMap.getValueFromIntKey(1)),
6365
plutusData: cborMap
6466
.getValueFromIntKey<CborObject?>(2)
65-
?.to<DataOption, CborObject>((e) => DataOption.deserialize(e)),
67+
?.castTo<DataOption, CborObject>((e) => DataOption.deserialize(e)),
6668
scriptRef: cborMap
6769
.getValueFromIntKey<CborTagValue?>(3)
68-
?.to<ScriptRef, CborTagValue>((e) => ScriptRef.deserialize(e)));
70+
?.castTo<ScriptRef, CborTagValue>((e) => ScriptRef.deserialize(e)));
6971
}
7072
TransactionOutput copyWith({
7173
ADAAddress? address,

lib/ada/src/models/transaction/transaction/auxiliary_data.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class AuxiliaryData with ADASerialization {
3737
return AuxiliaryData(
3838
metadata: cbor
3939
.getIndex<CborObject?>(0)
40-
?.to<GeneralTransactionMetadata, CborMapValue>(
40+
?.castTo<GeneralTransactionMetadata, CborMapValue>(
4141
(e) => GeneralTransactionMetadata.deserialize(e)),
4242
nativeScripts: cbor
4343
.getIndex<CborObject?>(1)
44-
?.to<List<NativeScript>, CborListValue>((e) =>
44+
?.castTo<List<NativeScript>, CborListValue>((e) =>
4545
e.value.map((i) => NativeScript.deserialize(i)).toList()),
4646
);
4747
} else {
@@ -51,19 +51,19 @@ class AuxiliaryData with ADASerialization {
5151
preferAlonzoFormat: true,
5252
metadata: cobrList
5353
.getValueFromIntKey<CborObject?>(0)
54-
?.to<GeneralTransactionMetadata, CborMapValue>(
54+
?.castTo<GeneralTransactionMetadata, CborMapValue>(
5555
(e) => GeneralTransactionMetadata.deserialize(e)),
5656
nativeScripts: cobrList
5757
.getValueFromIntKey<CborObject?>(1)
58-
?.to<List<NativeScript>, CborListValue>((e) =>
58+
?.castTo<List<NativeScript>, CborListValue>((e) =>
5959
e.value.map((i) => NativeScript.deserialize(i)).toList()),
6060
plutusScripts: cobrList
6161
.getValueFromIntKey<CborObject?>(2)
62-
?.to<List<PlutusScript>, CborListValue>((e) {
62+
?.castTo<List<PlutusScript>, CborListValue>((e) {
6363
final v1 = e.value.map((i) => PlutusScript.deserialize(i)).toList();
6464
final v2 = cobrList
6565
.getValueFromIntKey<CborObject?>(3)
66-
?.to<List<PlutusScript>, CborListValue>((e) {
66+
?.castTo<List<PlutusScript>, CborListValue>((e) {
6767
return e.value
6868
.map((i) =>
6969
PlutusScript.deserialize(i, language: Language.plutusV2))

lib/ada/src/models/transaction/transaction/body.dart

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,28 @@ class TransactionBody with ADASerialization {
7171
ttl: cbor.getValueFromIntKey<CborObject?>(3)?.getInteger(),
7272
withdrawals: cbor
7373
.getValueFromIntKey<CborObject?>(5)
74-
?.to<Withdrawals, CborMapValue>((e) => Withdrawals.deserialize(e)),
74+
?.castTo<Withdrawals, CborMapValue>(
75+
(e) => Withdrawals.deserialize(e)),
7576
auxiliaryDataHash: cbor
7677
.getValueFromIntKey<CborObject?>(7)
77-
?.to<AuxiliaryDataHash, CborBytesValue>(
78+
?.castTo<AuxiliaryDataHash, CborBytesValue>(
7879
(CborBytesValue e) => AuxiliaryDataHash.deserialize(e)),
7980
certs: cbor
8081
.getValueFromIntKey<CborObject?>(4)
81-
?.to<List<Certificate>, CborListValue<CborObject>>(
82-
(CborListValue<CborObject> e) => e.value
83-
.map((e) => Certificate.deserialize(e.cast()))
84-
.toList()),
82+
?.castTo<List<Certificate>, CborListValue<CborObject>>((CborListValue<CborObject> e) =>
83+
e.value.map((e) => Certificate.deserialize(e.cast())).toList()),
8584
update: cbor
8685
.getValueFromIntKey<CborListValue?>(6)
87-
?.to<Update, CborListValue>((e) => Update.deserialize(e)),
86+
?.castTo<Update, CborListValue>((e) => Update.deserialize(e)),
8887
validityStartInterval: cbor.getValueFromIntKey<CborObject?>(8)?.getInteger(),
89-
mint: cbor.getValueFromIntKey<CborMapValue?>(9)?.to<Mint, CborMapValue>((e) => Mint.deserialize(e.cast())),
90-
scriptDataHash: cbor.getValueFromIntKey<CborBytesValue?>(11)?.to<ScriptDataHash, CborBytesValue>((e) => ScriptDataHash.deserialize(e)),
91-
collateral: cbor.getValueFromIntKey<CborListValue?>(13)?.to<List<TransactionInput>, CborListValue<CborObject>>((e) => e.value.map((e) => TransactionInput.deserialize(e.cast())).toList()),
92-
requiredSigners: cbor.getValueFromIntKey<CborListValue?>(14)?.to<List<Ed25519KeyHash>, CborListValue<CborObject>>((e) => e.value.map((e) => Ed25519KeyHash.deserialize(e.cast())).toList()),
93-
network: cbor.getValueFromIntKey<CborIntValue?>(15)?.to<ADANetwork, CborIntValue>((e) => ADANetwork.fromTag(e.value)),
94-
collateralReturn: cbor.getValueFromIntKey<CborObject?>(16)?.to<TransactionOutput, CborObject>((e) => TransactionOutput.deserialize(e)),
88+
mint: cbor.getValueFromIntKey<CborMapValue?>(9)?.castTo<Mint, CborMapValue>((e) => Mint.deserialize(e.cast())),
89+
scriptDataHash: cbor.getValueFromIntKey<CborBytesValue?>(11)?.castTo<ScriptDataHash, CborBytesValue>((e) => ScriptDataHash.deserialize(e)),
90+
collateral: cbor.getValueFromIntKey<CborListValue?>(13)?.castTo<List<TransactionInput>, CborListValue<CborObject>>((e) => e.value.map((e) => TransactionInput.deserialize(e.cast())).toList()),
91+
requiredSigners: cbor.getValueFromIntKey<CborListValue?>(14)?.castTo<List<Ed25519KeyHash>, CborListValue<CborObject>>((e) => e.value.map((e) => Ed25519KeyHash.deserialize(e.cast())).toList()),
92+
network: cbor.getValueFromIntKey<CborIntValue?>(15)?.castTo<ADANetwork, CborIntValue>((e) => ADANetwork.fromTag(e.value)),
93+
collateralReturn: cbor.getValueFromIntKey<CborObject?>(16)?.castTo<TransactionOutput, CborObject>((e) => TransactionOutput.deserialize(e)),
9594
totalCollateral: cbor.getValueFromIntKey<CborObject?>(17)?.getInteger(),
96-
referenceInputs: cbor.getValueFromIntKey<CborListValue?>(18)?.to<List<TransactionInput>, CborListValue<CborObject>>((e) => e.value.map((e) => TransactionInput.deserialize(e.cast())).toList()));
95+
referenceInputs: cbor.getValueFromIntKey<CborListValue?>(18)?.castTo<List<TransactionInput>, CborListValue<CborObject>>((e) => e.value.map((e) => TransactionInput.deserialize(e.cast())).toList()));
9796
}
9897
TransactionBody copyWith({
9998
List<TransactionInput>? inputs,

lib/ada/src/models/transaction/transaction/transaction.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ADATransaction with ADASerialization {
2424
body: TransactionBody.deserialize(cbor.getIndex(0)),
2525
witnessSet: TransactionWitnessSet.deserialize(cbor.getIndex(1)),
2626
isValid: cbor.getIndex(2),
27-
data: cbor.getIndex<CborObject?>(3)?.to<AuxiliaryData, CborObject>(
27+
data: cbor.getIndex<CborObject?>(3)?.castTo<AuxiliaryData, CborObject>(
2828
(e) => AuxiliaryData.deserialize(e)));
2929
}
3030
factory ADATransaction.fromJson(Map<String, dynamic> json) {

0 commit comments

Comments
 (0)