solidity-scale-codec 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/Scale/Array/BoolArr.sol +3 -3
- package/src/Scale/Array/I128Arr.sol +3 -3
- package/src/Scale/Array/I16Arr.sol +3 -3
- package/src/Scale/Array/I256Arr.sol +3 -3
- package/src/Scale/Array/I32Arr.sol +3 -3
- package/src/Scale/Array/I64Arr.sol +3 -3
- package/src/Scale/Array/I8Arr.sol +3 -3
- package/src/Scale/Array/U128Arr.sol +3 -3
- package/src/Scale/Array/U16Arr.sol +3 -3
- package/src/Scale/Array/U256Arr.sol +3 -3
- package/src/Scale/Array/U32Arr.sol +3 -3
- package/src/Scale/Array/U64Arr.sol +3 -3
- package/src/Scale/Array/U8Arr.sol +3 -3
- package/src/Scale/Array.sol +15 -14
- package/src/Scale/Compact/Compact.sol +4 -2
- package/src/Scale/Signed/I128.sol +9 -14
- package/src/Scale/Signed/I16.sol +8 -11
- package/src/Scale/Signed/I256.sol +9 -14
- package/src/Scale/Signed/I32.sol +8 -11
- package/src/Scale/Signed/I64.sol +8 -11
- package/src/Scale/Signed/I8.sol +8 -11
- package/src/Scale/Signed.sol +8 -7
- package/src/Scale/Unsigned.sol +8 -7
- package/src/Xcm/v3/MaybeErrorCode/MaybeErrorCodeCodec.sol +1 -6
- package/src/Xcm/v5/AssetFilter/AssetFilterCodec.sol +1 -6
- package/src/Xcm/v5/AssetInstance/AssetInstanceCodec.sol +1 -9
- package/src/Xcm/v5/AssetTransferFilter/AssetTransferFilterCodec.sol +1 -7
- package/src/Xcm/v5/BodyPart/BodyPartCodec.sol +1 -8
- package/src/Xcm/v5/Fungibility/FungibilityCodec.sol +1 -6
- package/src/Xcm/v5/Instruction/InstructionCodec.sol +1246 -1295
- package/src/Xcm/v5/Junction/JunctionCodec.sol +1 -13
- package/src/Xcm/v5/NetworkId/NetworkIdCodec.sol +1 -7
- package/src/Xcm/v5/Response/ResponseCodec.sol +1 -9
- package/src/Xcm/v5/WeightLimit/WeightLimitCodec.sol +1 -5
- package/src/Xcm/v5/WildAsset/WildAssetCodec.sol +1 -7
- package/src/Xcm/v5/Xcm/XcmBuilder.sol +1 -101
|
@@ -10,19 +10,7 @@ import {NetworkIdCodec} from "../NetworkId/NetworkIdCodec.sol";
|
|
|
10
10
|
import {Bytes32} from "../../../Scale/Bytes.sol";
|
|
11
11
|
import {Address} from "../../../Scale/Address.sol";
|
|
12
12
|
import {Compact} from "../../../Scale/Compact.sol";
|
|
13
|
-
import {
|
|
14
|
-
Junction,
|
|
15
|
-
JunctionVariant,
|
|
16
|
-
ParachainParams,
|
|
17
|
-
AccountId32Params,
|
|
18
|
-
PluralityParams,
|
|
19
|
-
AccountIndex64Params,
|
|
20
|
-
AccountKey20Params,
|
|
21
|
-
GeneralKeyParams,
|
|
22
|
-
PalletInstanceParams,
|
|
23
|
-
GeneralIndexParams,
|
|
24
|
-
GlobalConsensusParams
|
|
25
|
-
} from "./Junction.sol";
|
|
13
|
+
import {Junction, JunctionVariant, ParachainParams, AccountId32Params, PluralityParams, AccountIndex64Params, AccountKey20Params, GeneralKeyParams, PalletInstanceParams, GeneralIndexParams, GlobalConsensusParams} from "./Junction.sol";
|
|
26
14
|
import {BytesUtils} from "../../../Utils/BytesUtils.sol";
|
|
27
15
|
import {UnsignedUtils} from "../../../Utils/UnsignedUtils.sol";
|
|
28
16
|
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.28;
|
|
3
3
|
|
|
4
4
|
import {Compact} from "../../../Scale/Compact.sol";
|
|
5
|
-
import {
|
|
6
|
-
NetworkId,
|
|
7
|
-
NetworkIdVariant,
|
|
8
|
-
ByForkParams,
|
|
9
|
-
ByGenesisParams,
|
|
10
|
-
EthereumParams
|
|
11
|
-
} from "./NetworkId.sol";
|
|
5
|
+
import {NetworkId, NetworkIdVariant, ByForkParams, ByGenesisParams, EthereumParams} from "./NetworkId.sol";
|
|
12
6
|
import {LittleEndianU64} from "../../../LittleEndian/LittleEndianU64.sol";
|
|
13
7
|
import {Bytes32} from "../../../Scale/Bytes.sol";
|
|
14
8
|
import {BytesUtils} from "../../../Utils/BytesUtils.sol";
|
|
@@ -11,15 +11,7 @@ import {MaybeErrorCode} from "../../v3/MaybeErrorCode/MaybeErrorCode.sol";
|
|
|
11
11
|
import {MaybeErrorCodeCodec} from "../../v3/MaybeErrorCode/MaybeErrorCodeCodec.sol";
|
|
12
12
|
import {Compact} from "../../../Scale/Compact.sol";
|
|
13
13
|
import {LittleEndianU32} from "../../../LittleEndian/LittleEndianU32.sol";
|
|
14
|
-
import {
|
|
15
|
-
Response,
|
|
16
|
-
ResponseVariant,
|
|
17
|
-
AssetsParams,
|
|
18
|
-
VersionParams,
|
|
19
|
-
DispatchResultParams,
|
|
20
|
-
ExecutionResultParams,
|
|
21
|
-
PalletsInfoParams
|
|
22
|
-
} from "./Response.sol";
|
|
14
|
+
import {Response, ResponseVariant, AssetsParams, VersionParams, DispatchResultParams, ExecutionResultParams, PalletsInfoParams} from "./Response.sol";
|
|
23
15
|
|
|
24
16
|
import {BytesUtils} from "../../../Utils/BytesUtils.sol";
|
|
25
17
|
|
|
@@ -3,11 +3,7 @@ pragma solidity ^0.8.28;
|
|
|
3
3
|
|
|
4
4
|
import {Weight} from "../Weight/Weight.sol";
|
|
5
5
|
import {WeightCodec} from "../Weight/WeightCodec.sol";
|
|
6
|
-
import {
|
|
7
|
-
WeightLimit,
|
|
8
|
-
WeightLimitVariant,
|
|
9
|
-
LimitedParams
|
|
10
|
-
} from "./WeightLimit.sol";
|
|
6
|
+
import {WeightLimit, WeightLimitVariant, LimitedParams} from "./WeightLimit.sol";
|
|
11
7
|
import {BytesUtils} from "../../../Utils/BytesUtils.sol";
|
|
12
8
|
|
|
13
9
|
/// @title SCALE Codec for XCM v5 `WeightLimit`
|
|
@@ -6,13 +6,7 @@ import {AssetIdCodec} from "../AssetId/AssetIdCodec.sol";
|
|
|
6
6
|
import {WildFungibilityCodec} from "../WildFungibility/WildFungibilityCodec.sol";
|
|
7
7
|
import {AssetId} from "../AssetId/AssetId.sol";
|
|
8
8
|
import {WildFungibility} from "../WildFungibility/WildFungibility.sol";
|
|
9
|
-
import {
|
|
10
|
-
WildAsset,
|
|
11
|
-
WildAssetVariant,
|
|
12
|
-
AllOfParams,
|
|
13
|
-
AllCountedParams,
|
|
14
|
-
AllOfCountedParams
|
|
15
|
-
} from "./WildAsset.sol";
|
|
9
|
+
import {WildAsset, WildAssetVariant, AllOfParams, AllCountedParams, AllOfCountedParams} from "./WildAsset.sol";
|
|
16
10
|
import {BytesUtils} from "../../../Utils/BytesUtils.sol";
|
|
17
11
|
import {UnsignedUtils} from "../../../Utils/UnsignedUtils.sol";
|
|
18
12
|
|
|
@@ -1,107 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
pragma solidity ^0.8.28;
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
aliasOrigin as _aliasOrigin,
|
|
6
|
-
burnAsset as _burnAsset,
|
|
7
|
-
buyExecution as _buyExecution,
|
|
8
|
-
claimAsset as _claimAsset,
|
|
9
|
-
clearError as _clearError,
|
|
10
|
-
clearOrigin as _clearOrigin,
|
|
11
|
-
clearTopic as _clearTopic,
|
|
12
|
-
clearTransactStatus as _clearTransactStatus,
|
|
13
|
-
depositAsset as _depositAsset,
|
|
14
|
-
depositReserveAsset as _depositReserveAsset,
|
|
15
|
-
descendOrigin as _descendOrigin,
|
|
16
|
-
executeWithOrigin as _executeWithOrigin,
|
|
17
|
-
expectAsset as _expectAsset,
|
|
18
|
-
expectError as _expectError,
|
|
19
|
-
expectOrigin as _expectOrigin,
|
|
20
|
-
expectPallet as _expectPallet,
|
|
21
|
-
expectTransactStatus as _expectTransactStatus,
|
|
22
|
-
exchangeAsset as _exchangeAsset,
|
|
23
|
-
exportMessage as _exportMessage,
|
|
24
|
-
hrmpChannelAccepted as _hrmpChannelAccepted,
|
|
25
|
-
hrmpChannelClosing as _hrmpChannelClosing,
|
|
26
|
-
hrmpNewChannelOpenRequest as _hrmpNewChannelOpenRequest,
|
|
27
|
-
initiateReserveWithdraw as _initiateReserveWithdraw,
|
|
28
|
-
initiateTeleport as _initiateTeleport,
|
|
29
|
-
initiateTransfer as _initiateTransfer,
|
|
30
|
-
lockAsset as _lockAsset,
|
|
31
|
-
noteUnlockable as _noteUnlockable,
|
|
32
|
-
payFees as _payFees,
|
|
33
|
-
queryPallet as _queryPallet,
|
|
34
|
-
queryResponse as _queryResponse,
|
|
35
|
-
receiveTeleportedAsset as _receiveTeleportedAsset,
|
|
36
|
-
refundSurplus as _refundSurplus,
|
|
37
|
-
reportError as _reportError,
|
|
38
|
-
reportHolding as _reportHolding,
|
|
39
|
-
reportTransactStatus as _reportTransactStatus,
|
|
40
|
-
requestUnlock as _requestUnlock,
|
|
41
|
-
reserveAssetDeposited as _reserveAssetDeposited,
|
|
42
|
-
setAppendix as _setAppendix,
|
|
43
|
-
setErrorHandler as _setErrorHandler,
|
|
44
|
-
setFeesMode as _setFeesMode,
|
|
45
|
-
setHints as _setHints,
|
|
46
|
-
setTopic as _setTopic,
|
|
47
|
-
subscribeVersion as _subscribeVersion,
|
|
48
|
-
transact as _transact,
|
|
49
|
-
transferAsset as _transferAsset,
|
|
50
|
-
transferReserveAsset as _transferReserveAsset,
|
|
51
|
-
trap as _trap,
|
|
52
|
-
universalOrigin as _universalOrigin,
|
|
53
|
-
unpaidExecution as _unpaidExecution,
|
|
54
|
-
unlockAsset as _unlockAsset,
|
|
55
|
-
unsubscribeVersion as _unsubscribeVersion,
|
|
56
|
-
withdrawAsset as _withdrawAsset,
|
|
57
|
-
AliasOriginParams,
|
|
58
|
-
BurnAssetParams,
|
|
59
|
-
BuyExecutionParams,
|
|
60
|
-
ClaimAssetParams,
|
|
61
|
-
DepositAssetParams,
|
|
62
|
-
DepositReserveAssetParams,
|
|
63
|
-
DescendOriginParams,
|
|
64
|
-
ExecuteWithOriginParams,
|
|
65
|
-
ExpectAssetParams,
|
|
66
|
-
ExpectErrorParams,
|
|
67
|
-
ExpectOriginParams,
|
|
68
|
-
ExpectPalletParams,
|
|
69
|
-
ExpectTransactStatusParams,
|
|
70
|
-
ExchangeAssetParams,
|
|
71
|
-
ExportMessageParams,
|
|
72
|
-
HrmpChannelAcceptedParams,
|
|
73
|
-
HrmpChannelClosingParams,
|
|
74
|
-
HrmpNewChannelOpenRequestParams,
|
|
75
|
-
InitiateReserveWithdrawParams,
|
|
76
|
-
InitiateTeleportParams,
|
|
77
|
-
InitiateTransferParams,
|
|
78
|
-
Instruction,
|
|
79
|
-
LockAssetParams,
|
|
80
|
-
NoteUnlockableParams,
|
|
81
|
-
PayFeesParams,
|
|
82
|
-
QueryPalletParams,
|
|
83
|
-
QueryResponseParams,
|
|
84
|
-
ReceiveTeleportedAssetParams,
|
|
85
|
-
ReportErrorParams,
|
|
86
|
-
ReportHoldingParams,
|
|
87
|
-
ReportTransactStatusParams,
|
|
88
|
-
RequestUnlockParams,
|
|
89
|
-
ReserveAssetDepositedParams,
|
|
90
|
-
SetAppendixParams,
|
|
91
|
-
SetErrorHandlerParams,
|
|
92
|
-
SetFeesModeParams,
|
|
93
|
-
SetHintsParams,
|
|
94
|
-
SetTopicParams,
|
|
95
|
-
SubscribeVersionParams,
|
|
96
|
-
TransactParams,
|
|
97
|
-
TransferAssetParams,
|
|
98
|
-
TransferReserveAssetParams,
|
|
99
|
-
TrapParams,
|
|
100
|
-
UniversalOriginParams,
|
|
101
|
-
UnpaidExecutionParams,
|
|
102
|
-
UnlockAssetParams,
|
|
103
|
-
WithdrawAssetParams
|
|
104
|
-
} from "../Instruction/Instruction.sol";
|
|
4
|
+
import {aliasOrigin as _aliasOrigin, burnAsset as _burnAsset, buyExecution as _buyExecution, claimAsset as _claimAsset, clearError as _clearError, clearOrigin as _clearOrigin, clearTopic as _clearTopic, clearTransactStatus as _clearTransactStatus, depositAsset as _depositAsset, depositReserveAsset as _depositReserveAsset, descendOrigin as _descendOrigin, executeWithOrigin as _executeWithOrigin, expectAsset as _expectAsset, expectError as _expectError, expectOrigin as _expectOrigin, expectPallet as _expectPallet, expectTransactStatus as _expectTransactStatus, exchangeAsset as _exchangeAsset, exportMessage as _exportMessage, hrmpChannelAccepted as _hrmpChannelAccepted, hrmpChannelClosing as _hrmpChannelClosing, hrmpNewChannelOpenRequest as _hrmpNewChannelOpenRequest, initiateReserveWithdraw as _initiateReserveWithdraw, initiateTeleport as _initiateTeleport, initiateTransfer as _initiateTransfer, lockAsset as _lockAsset, noteUnlockable as _noteUnlockable, payFees as _payFees, queryPallet as _queryPallet, queryResponse as _queryResponse, receiveTeleportedAsset as _receiveTeleportedAsset, refundSurplus as _refundSurplus, reportError as _reportError, reportHolding as _reportHolding, reportTransactStatus as _reportTransactStatus, requestUnlock as _requestUnlock, reserveAssetDeposited as _reserveAssetDeposited, setAppendix as _setAppendix, setErrorHandler as _setErrorHandler, setFeesMode as _setFeesMode, setHints as _setHints, setTopic as _setTopic, subscribeVersion as _subscribeVersion, transact as _transact, transferAsset as _transferAsset, transferReserveAsset as _transferReserveAsset, trap as _trap, universalOrigin as _universalOrigin, unpaidExecution as _unpaidExecution, unlockAsset as _unlockAsset, unsubscribeVersion as _unsubscribeVersion, withdrawAsset as _withdrawAsset, AliasOriginParams, BurnAssetParams, BuyExecutionParams, ClaimAssetParams, DepositAssetParams, DepositReserveAssetParams, DescendOriginParams, ExecuteWithOriginParams, ExpectAssetParams, ExpectErrorParams, ExpectOriginParams, ExpectPalletParams, ExpectTransactStatusParams, ExchangeAssetParams, ExportMessageParams, HrmpChannelAcceptedParams, HrmpChannelClosingParams, HrmpNewChannelOpenRequestParams, InitiateReserveWithdrawParams, InitiateTeleportParams, InitiateTransferParams, Instruction, LockAssetParams, NoteUnlockableParams, PayFeesParams, QueryPalletParams, QueryResponseParams, ReceiveTeleportedAssetParams, ReportErrorParams, ReportHoldingParams, ReportTransactStatusParams, RequestUnlockParams, ReserveAssetDepositedParams, SetAppendixParams, SetErrorHandlerParams, SetFeesModeParams, SetHintsParams, SetTopicParams, SubscribeVersionParams, TransactParams, TransferAssetParams, TransferReserveAssetParams, TrapParams, UniversalOriginParams, UnpaidExecutionParams, UnlockAssetParams, WithdrawAssetParams} from "../Instruction/Instruction.sol";
|
|
105
5
|
import {Xcm, fromInstructions, newXcm} from "./Xcm.sol";
|
|
106
6
|
|
|
107
7
|
library XcmBuilder {
|