Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
6065a59
CSDK-125 new PurseIdentifier type
davidatwhiletrue May 13, 2024
904aa29
CSDK-126 BlockIdentifier type
davidatwhiletrue May 13, 2024
52eb681
CSDK-127 new QueryBalanceDetails class in CasperMethods
davidatwhiletrue May 13, 2024
232cbd0
CSDK-128 new QueryBalanceDetailsResult type
davidatwhiletrue May 13, 2024
f882c13
CSDK-129 New methods in CasperClient class.
davidatwhiletrue May 13, 2024
074ff2f
CSDK-115 added latest_switch_block_hash property
davidatwhiletrue May 13, 2024
39fd53b
CSDK-114 chain_get_block
davidatwhiletrue May 14, 2024
785f6fa
CSDK-116 new global state keys in Casper2
davidatwhiletrue May 16, 2024
0a3e284
Merge branch 'refs/heads/feat-2-0/query-balance-details' into feat-2-…
davidatwhiletrue May 16, 2024
329203b
Merge branch 'refs/heads/feat-2-0/info-get-status' into feat-2-0/impo…
davidatwhiletrue May 16, 2024
b04cae8
CSDK-119 state_get_entity implementation
davidatwhiletrue May 16, 2024
9aab087
CSDK-118 refactor Transform to TransformV1. Implement TransformV2 and…
davidatwhiletrue May 17, 2024
9e1ffd0
CSDK-119 update for rc2
davidatwhiletrue May 21, 2024
9b55b6c
CSDK-118 added EntryPointKey and EntryPoint types.
davidatwhiletrue May 21, 2024
050ebf4
CSDK-179 finalitysignature parsing
davidatwhiletrue May 22, 2024
21c773e
CSDK-179 finalitysignature parsing
davidatwhiletrue May 22, 2024
3505f08
CSDK-179 finalitysignature parsing
davidatwhiletrue May 22, 2024
5e17fb4
CSDK-179 finalitysignature parsing
davidatwhiletrue May 22, 2024
8701f07
CSDK-120 CSDK-121
davidatwhiletrue May 30, 2024
6cedd43
Updates to send transactions on rc2
davidatwhiletrue Jun 3, 2024
c8d4459
fix URL for SSE endpoint
davidatwhiletrue Jun 4, 2024
66a4a46
CSDK-181 add backwards compat to GetDeploy() RPC method
davidatwhiletrue Jun 5, 2024
5205087
fix Transfer cast
davidatwhiletrue Jun 5, 2024
cd02a4e
CSDK-112 align query_balance_details with RC2 schema.
davidatwhiletrue Jun 5, 2024
56e0e0a
CSDK-179 added backwards compatibility to FinalitySignature parsing.
davidatwhiletrue Jun 11, 2024
4a7aa48
CSDK-123 use PurseIdentifier in CasperMethods to allow entity adresses.
davidatwhiletrue Jun 11, 2024
9cf2350
CSDK-114 chain_get_block
davidatwhiletrue May 14, 2024
c9424c6
Parse blocks from Casper 1.x node (backward compat)
davidatwhiletrue May 31, 2024
aa52ee1
parse chain_get_block_transfers response from Casper 1.x (backward co…
davidatwhiletrue May 31, 2024
16407b1
Backward Compat: unify TransferV1 and TransferV2 in one single class …
davidatwhiletrue May 31, 2024
6ce5fce
Renamed BlockV2 to Block. Implement cast operators to convert BlockV…
davidatwhiletrue Jun 3, 2024
1666153
refactor Transfer casting to follow same approach as the implementati…
davidatwhiletrue Jun 5, 2024
565c75b
CSDK-175 updated BlockAdded parsing for backwards compatibility.
davidatwhiletrue Jun 11, 2024
ad1666d
added tests.
davidatwhiletrue Jun 11, 2024
c139e0d
added unit tests.
davidatwhiletrue Jun 11, 2024
93b5c2d
fix BidAddrKey parsing
davidatwhiletrue Jun 14, 2024
da8bd04
fix AddressableEntityKey serialization to bytes
davidatwhiletrue Jun 20, 2024
d4c97d4
added BlockTransaction type to expose a single list of transactions i…
davidatwhiletrue Jun 20, 2024
ef94886
updated tests
davidatwhiletrue Jun 20, 2024
dd09439
Flattened Block type and added cast operator to retrieve original Blo…
davidatwhiletrue Jun 26, 2024
dfdf7bc
Fix parsing of Step server event.
davidatwhiletrue Jun 26, 2024
8175a73
fixed BlockHeader header in QueryGlobalStateResult .
davidatwhiletrue Jun 26, 2024
fe593c9
Merge pull request #63 from make-software/feat-2-0/chain-get-block
davidatwhiletrue Jun 28, 2024
b911529
fix bug parsing Version1.ExecutoinResults
davidatwhiletrue Jun 28, 2024
6e9fc69
fix bug parsing Version1.ExecutoinResults
davidatwhiletrue Jun 28, 2024
e14849d
modified ServerEventsClient to connect either to node version 1.x or …
davidatwhiletrue Jun 28, 2024
b3e9352
Merge pull request #62 from make-software/feat-2-0/info-get-status
davidatwhiletrue Jul 1, 2024
fcb3eb0
refactor GetBalance / QueryBalance methods.
davidatwhiletrue Jul 1, 2024
5dd74e5
Merge pull request #61 from make-software/feat-2-0/query-balance-details
davidatwhiletrue Jul 1, 2024
909e395
implement IPurseIdentifier in the AddressableEntityKey
davidatwhiletrue Jul 1, 2024
d9405a3
Added Message parsing to TransactionProcessed SSE event.
davidatwhiletrue Jul 2, 2024
2cfd9f9
Merge remote-tracking branch 'refs/remotes/origin/casper-2.0.0' into …
davidatwhiletrue Jul 2, 2024
a79890d
Merge pull request #64 from make-software/feat-2-0/global-state-keys
davidatwhiletrue Jul 2, 2024
580c032
Merge branch 'casper-2.0.0' into feat-2-0/state_get_entity
davidatwhiletrue Jul 3, 2024
b451f01
implemented IPurseIdentifier interface (missed on rebase).
davidatwhiletrue Jul 3, 2024
6870c75
bugfix parsing AddressableEntity for SmartContract
davidatwhiletrue Jul 7, 2024
e53edd6
bugfix parse correctly BlockHeader from QueryGlobalState for v156 net…
davidatwhiletrue Jul 7, 2024
0582902
fixed EntryPoint parsing for GetStateItem on v156.
davidatwhiletrue Jul 7, 2024
6d511c1
remove entry points from AddressableEntity.cs
davidatwhiletrue Jul 7, 2024
f22b32d
CSDK-120, CSDK-121, get/put transaction
davidatwhiletrue Jul 8, 2024
6421a2d
Merge pull request #65 from make-software/feat-2-0/state_get_entity
davidatwhiletrue Jul 8, 2024
b122005
Merge branch 'casper-2.0.0' into feat-2-0/state_get_entity
davidatwhiletrue Jul 8, 2024
e7cf844
Merge branch 'feat-2-0/get-put-transaction' into feat-2-0/sse
davidatwhiletrue Jul 8, 2024
c4035c5
Merge branch 'feat-2-0/info-get-deploy-compat' into feat-2-0/sse
davidatwhiletrue Jul 8, 2024
2a05550
WIP migration guide
davidatwhiletrue Jul 8, 2024
9992e48
WIP
davidatwhiletrue Jul 9, 2024
60d7fb9
WIP
davidatwhiletrue Jul 9, 2024
5c6ab92
WIP migration guide
davidatwhiletrue Jul 9, 2024
a8c2c6b
Corrections. WIP.
davidatwhiletrue Jul 9, 2024
205f95c
Added info about versioned Transfer class to migration guide.
davidatwhiletrue Jul 10, 2024
8ce1bba
Added changelog for v3.0.0-beta1.
davidatwhiletrue Jul 10, 2024
1b147fc
Merge pull request #70 from make-software/feat-2-0/sse
davidatwhiletrue Jul 10, 2024
e7f6378
added IsSuccess getter to ExecutionResult class
davidatwhiletrue Jul 11, 2024
c465935
Merge pull request #71 from make-software/feat-2-0/issuccess
davidatwhiletrue Jul 11, 2024
9872b0c
Renamed LegacyTransfer to Transfer in StoredValue
davidatwhiletrue Jul 11, 2024
77ff5db
Update integration tests to fix issues due to changes in the SDK.
davidatwhiletrue Jul 11, 2024
8aba8ba
fixed TransformV1 to Transform cast
davidatwhiletrue Jul 12, 2024
767e733
Merge pull request #72 from make-software/fix-nctl-transfer-tests
davidatwhiletrue Jul 12, 2024
3316768
Update versions to .NET 8
davidatwhiletrue Jul 12, 2024
ba45df8
replace existing `int blockHeight` arguments with the proper `ulong b…
davidatwhiletrue Jul 12, 2024
744e4f8
Merge pull request #73 from make-software/feat-2-0/ulong-blockheight
davidatwhiletrue Jul 12, 2024
c2674e2
Bump up version to 3.0.0-beta1
davidatwhiletrue Jul 12, 2024
0d9f7ec
update nuget publish pipeline to .net8
davidatwhiletrue Jul 12, 2024
7431909
Merge pull request #74 from make-software/feat-2-0/migration-guide
davidatwhiletrue Jul 12, 2024
e3a2fa4
Fixed typos in migration guide
davidatwhiletrue Jul 12, 2024
f42bb6e
Update push-to-github-registry.yml
davidatwhiletrue Jul 15, 2024
2287749
CSDK-187 implemented info-get-reward RPC method
davidatwhiletrue Jul 16, 2024
54ed829
CSDK-189 added protocol_version to get node status response
davidatwhiletrue Jul 16, 2024
967d689
Implement Transaction class as an abstraction of Deploy and Transacti…
davidatwhiletrue Jul 18, 2024
ea537fb
Bugfix: fixed parsing of Step event on Casper 1.x network
davidatwhiletrue Jul 18, 2024
a165d2c
Merge pull request #78 from make-software/feat-2-0/step-parsing-bug
davidatwhiletrue Jul 18, 2024
d90c103
Merge pull request #76 from make-software/feat-2-0/info-get-reward
davidatwhiletrue Jul 18, 2024
8c8a313
removed default value for finalizedApprovals
davidatwhiletrue Jul 18, 2024
6955500
Refactored PricingMode
davidatwhiletrue Jul 19, 2024
3695df4
Added TransactionBuilder class
davidatwhiletrue Jul 24, 2024
1764abc
Bugfix: for a v156 deploy, list of transforms was not correctly conve…
davidatwhiletrue Aug 2, 2024
3732859
Merge pull request #77 from make-software/feat-2-0/protocol_version_i…
davidatwhiletrue Aug 2, 2024
bd277ec
Added Get*Rewards* methods to ICasperClient
davidatwhiletrue Aug 2, 2024
edb03e7
Added switch_block_hash to get_reward response
davidatwhiletrue Aug 2, 2024
0cb23cd
fixed a multithreading problem with RPCLoggingHandler
davidatwhiletrue Aug 6, 2024
bc8db90
Updated examples
davidatwhiletrue Aug 6, 2024
561fc1e
Updated examples
davidatwhiletrue Aug 6, 2024
de2add8
Merge pull request #79 from make-software/feat-2-0/transaction-refact…
davidatwhiletrue Aug 7, 2024
3f25a6c
Merge pull request #80 from make-software/feat-2-0/switch-block-hash
davidatwhiletrue Aug 9, 2024
78c361b
Merge pull request #81 from make-software/feat-2-0/rpclogginghandler-…
davidatwhiletrue Aug 20, 2024
9e6eb85
fixed AwaitEvents example
davidatwhiletrue Aug 20, 2024
d0c223c
WIP
davidatwhiletrue Nov 19, 2024
9c5ede5
bugfix: ContractWasm is a complex type, not a string
davidatwhiletrue Nov 21, 2024
d815ade
TransactionV1 serialization
davidatwhiletrue Nov 26, 2024
13284c5
TransactionV1 serialization
davidatwhiletrue Nov 26, 2024
59a78f5
Changes to StoredValue type for rc5
davidatwhiletrue Nov 21, 2024
f21536e
CSDK-1291 implemented new RPC method state_get_package.
davidatwhiletrue Nov 17, 2024
43560bb
TransactionV1 serialization
davidatwhiletrue Nov 26, 2024
84aabca
WIP
davidatwhiletrue Dec 5, 2024
1fcb33a
Added missing native entry points to TransactionBuilder class
davidatwhiletrue Dec 10, 2024
7c6f640
Merge branch 'rc5-test' into feature/CSDK-192-transaction-v1-serializ…
davidatwhiletrue Dec 10, 2024
569fa41
Rename Prepaid to Prepayment to align with PR#5010
davidatwhiletrue Dec 12, 2024
dfe862c
Merge pull request #84 from make-software/feature/CSDK-192-transactio…
davidatwhiletrue Dec 13, 2024
2960992
modify TransactionRuntime type and serialize stored/session targets a…
davidatwhiletrue Dec 17, 2024
aa797ee
CSDK-195
davidatwhiletrue Dec 18, 2024
dbde986
update test data
davidatwhiletrue Dec 18, 2024
4153181
CSDK-195 Update MessageKey parsing.
davidatwhiletrue Dec 18, 2024
d144382
fix GlobalSTateKey tests
davidatwhiletrue Dec 18, 2024
4ed286a
Remove Category from Transaction abstract type
davidatwhiletrue Dec 18, 2024
b2a88a5
Fix test
davidatwhiletrue Dec 18, 2024
2c3699d
fix test
davidatwhiletrue Dec 18, 2024
eae9a16
CSDK-196
davidatwhiletrue Dec 18, 2024
aeeece5
Merge pull request #86 from make-software/feat-2-0/csdk-195
davidatwhiletrue Dec 18, 2024
cda1212
Merge pull request #87 from make-software/feat-2-0/CSDK-196
davidatwhiletrue Dec 18, 2024
3f714d5
Merge branch 'casper-2.0.0' into feat-2-0/CSDK-198-transaction-runtime
davidatwhiletrue Dec 18, 2024
da33436
Merge pull request #85 from make-software/feat-2-0/CSDK-198-transacti…
davidatwhiletrue Dec 18, 2024
24ef097
fix unit test
davidatwhiletrue Dec 18, 2024
3e820f4
Update 3.0.0-beta2 Changelog with changes introduced for RC5.
davidatwhiletrue Dec 18, 2024
49cf9c2
bugfix: Replace AddressableEntity with HashAddr in Message.
davidatwhiletrue Dec 18, 2024
971c8ab
update related test
davidatwhiletrue Dec 18, 2024
e9d42f8
Merge branch 'casper-2.0.0' into feat-2-0/csdk-195
davidatwhiletrue Dec 18, 2024
c18a6ad
Merge pull request #88 from make-software/feat-2-0/csdk-195
davidatwhiletrue Dec 18, 2024
48ad394
bugfix with SeigniorageAllocation parsing
davidatwhiletrue Dec 18, 2024
3738240
fix seigniorage allocation parsing. Added unit tests for v158 and v200.
davidatwhiletrue Dec 18, 2024
7bcc82f
Merge pull request #89 from make-software/feat-2-0/csdk-199-seigniora…
davidatwhiletrue Dec 18, 2024
3bb2090
Documentation fixes for beta2.
davidatwhiletrue Dec 18, 2024
adfbe9e
return Transaction object in TransactionBuilder class.
davidatwhiletrue Dec 20, 2024
2e45527
bump up SDK version.
davidatwhiletrue Dec 20, 2024
f2c3026
Merge pull request #90 from make-software/feat-2-0/transaction-builder
davidatwhiletrue Dec 20, 2024
c8fd4d9
Add get auction info v2 support.
davidatwhiletrue Feb 4, 2025
69fccaf
Convert Unified BidKind to Validator&Delegator bid kinds.
davidatwhiletrue Feb 5, 2025
165b418
Repeat for get by height.
davidatwhiletrue Feb 5, 2025
587be7a
missed file in last commit
davidatwhiletrue Feb 5, 2025
bf866ef
Fixed disabled_versions deserialization
davidatwhiletrue Feb 5, 2025
8490679
Merge pull request #92 from make-software/bugfix/disabled_versions_de…
davidatwhiletrue Feb 9, 2025
a3ff8b7
Merge pull request #91 from make-software/get_auction_info_v2
davidatwhiletrue Mar 4, 2025
4b94dd8
Updates to migration guide
davidatwhiletrue Mar 4, 2025
c11a784
Added WriteContractTransform_v200 test
davidatwhiletrue Mar 4, 2025
4918edb
compute hash from payload bytes and compare with transaction hash field
davidatwhiletrue Mar 6, 2025
a327ebc
Merge pull request #93 from make-software/bugfix/validate-txv1-hash
davidatwhiletrue Mar 6, 2025
b2c58e6
Merge branch 'master' into casper-2.0.0
davidatwhiletrue Mar 10, 2025
20e2d20
Adde refund and current_price parsing.
davidatwhiletrue Mar 17, 2025
74a5b23
handle entity-contract prefix in message keys
davidatwhiletrue Mar 17, 2025
a036604
replace HashAddr with AddressableEntity key.
davidatwhiletrue Mar 17, 2025
59248f9
Merge pull request #96 from make-software/bugfix/message-key-parsing
davidatwhiletrue Mar 17, 2025
6dbb51e
Merge pull request #95 from make-software/refund-field
davidatwhiletrue Mar 17, 2025
b1fbd8f
Fixes a bug where events are emitted 3 times in Casper 2.0.
davidatwhiletrue Mar 20, 2025
f892c5b
Merge pull request #100 from make-software/bugfix/duplicated-events
davidatwhiletrue Mar 20, 2025
67d1237
Bump up version. Update CHANGELOG.
davidatwhiletrue Mar 20, 2025
3f61e95
Fix test data
davidatwhiletrue Mar 20, 2025
26d7703
Merge pull request #101 from make-software/fix-message-topic-tests
davidatwhiletrue Mar 20, 2025
76cdef0
Added Unbond type to BidKind type
davidatwhiletrue Mar 20, 2025
0a0f347
Merge pull request #102 from make-software/unbond-bidkind
davidatwhiletrue Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push-to-github-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Create nuget package
run: dotnet pack --configuration Release -o out
- name: Publish Nuget to GitHub registry
Expand Down
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,94 @@ All notable changes to this project will be documented in this file. The format
[comment]: <> (Fixed: any bug fixes)
[comment]: <> (Security: in case of vulnerabilities)

## [3.0.0-beta3]

### Added

* The `TransactionBuilder` now accepts amount as `ulong` type for the `Payment()` method.
* New `GlobalStateKey.FromValidatorKey()` to get the bid address key of a validator.
* New `GetNodeVersion()` in the main client class as a convenient method to check node version.
* New `GetValidatorBid()` method to recover the bid information of a validator.

### Changed

* `MessageKey` contains an `AddressableEntity` property instead of a `HashAddr` to represent the related contract entity.
* `GetAuctionInfo()` now uses the new `state_get_auction_info_v2` RPC method in Casper 2.0.

### Fixed

* [#99](https://github.com/make-software/casper-net-sdk/issues/99) SSE Listener emits the same event 3 times when listening to EventType.All
* Fixed the `TransactionV1.ValidateHashes()` method to properly verify the hashes.

## [3.0.0-beta2]

### Added

* Added `GetDelegatorReward` and `GetValidatorReward` methods to the RPC client. [PR#76](https://github.com/make-software/casper-net-sdk/pull/76) and [PR#80](https://github.com/make-software/casper-net-sdk/pull/80).
* Added `GetStatePackage` method to the RPC client. [PR#82](https://github.com/make-software/casper-net-sdk/pull/82).
* Added `ProtocolVersion` to Get Node Status RPC response. [PR#77](https://github.com/make-software/casper-net-sdk/pull/77).
* Added a `TransactionBuilder` to build `TransactionV1` transactions for the different type of invocations ( to mint/auction system contracts, user stored contracts) and session deployments. [PR#79](https://github.com/make-software/casper-net-sdk/pull/79).

### Changed

* The `Transaction` type is now an abstraction for `TransactionV1` and `Deploy` transaction models. [PR#79](https://github.com/make-software/casper-net-sdk/pull/79).
* Updated `TransactionV1` JSON and bytes serialization in alignment to `casper-node v2.0.0-rc5`. [PR-84](https://github.com/make-software/casper-net-sdk/pull/84) and [PR-85](https://github.com/make-software/casper-net-sdk/pull/85)
* Updated `MessageKey` key type in alignment to `casper-node v2.0.0-rc5`. [PR-86](https://github.com/make-software/casper-net-sdk/pull/86)
* `EntryPointPayment.SelfOnly` constant replaced with `EntryPointPayment.DirectInvocationOnly`.[PR#87](https://github.com/make-software/casper-net-sdk/pull/87).

### Fixed

* Fixed a multi-thread bug when using the RPCLoggingHandler in the RPC client class. [PR#81](https://github.com/make-software/casper-net-sdk/pull/81).
* v3.0.0-beta1 did not parse correctly `Step` event emmitted by nodes in Casper v1.x. [PR#78](https://github.com/make-software/casper-net-sdk/pull/78).

## [3.0.0-beta1]

This version is compatible with Casper node v2.0.0-rc3 and Casper node v1.5.6.

### Added

* New `GetEntity()` method added to the RPC client.
* New `QueryBalanceDetails()` method added to the RPC client.
* New `PutTransaction()` and `GetTransaction()` methods added to the RPC client.
* New `TransactionV1` class to model the new type of transactions in Condor.
* New global state keys added to the SDK: `AddressableEntityKey`, `BalanceHoldKey`, `BidAddrKey`, `BlockGlobalAddrKey`, `ByteCodeKey`, `EntryPointKey`, `MessageKey`, `NamedKeyKey` and `PackageKey`.
* New `AddressableEntity` class added. It may represent an account, a stored smart contract, or a system smart contract.
* New properties in the `StoredValue` class that can be retrieved with `QueryGlobalState()` method: `BidKind`, `Unbonding`, `AddressableEntity`, `Package`, `ByteCode`, `MessageTopicSummary`, `Message`, `NamedKey`, `Reservation`, and `EntryPoint`.
* New classes to represent data from the global state: `BidKind`, `UnbondingPurse`, `Package` and `ByteCode`.
* New `Message` class to contain data for native events included in the `TransactionAccepted` event from the SSE channel.
* Added `TransactionAccepted`, `TransactionProcessed`, and `TransactionExpired` events to the list of events emitted by a node through the SSE interface.

### Changed

* The `Block` class has changed to abstract the developer from the versioned block records returned from the network in Condor version. Refer to the migration guide for more information.
* For blocks produced in Casper 2.0, the `Block` instance contains the previous switch block hash in the `LastSwitchBlockHash` property.
* Ther `EraEnd` class has changed to abstract the developer from the versioned records returned from the network. More info in the migration guide.
* The `Transfer` class contained in the response for a `GetBlockTransfers()` call or in a `ExecutionResult` object has changed to abstract from the versioned transfer records returned from the network. Refer to the migration guide for more information.
* The input argument for the `QueryBalance()` method in the RPC client is any object from a class implementing the `IPurseIdentifier` interface. `PublicKey`, `AccountHashKey`, `URef`, and `AddressableEntity` classes implement this interface.
* The type to refer to block heights is now `ulong` across all the SDK. In previous version there was a mix of `ulong` and `int`.
* When using the `GetNodeStatus()` method with a Casper 2.0 node, the response contains the hash for the latest switch block in the `LatestSwitchBlockHash` property.
* `GetDeploy()` response has changed and now contains a `ExecutionInfo`object when the deploy has been processed instead a list of `ExecutionResult` objects. The execution info itself contains block information and a result object.
* Starting with this version of the SDK, only public keys are checksummed with the CEP-57 standard. The rest of the keys and hashes are not checksummed anymore.
* In the `StoredValue` class, `Transfer` has been renamed to `LegacyTransfer`.
* `DeployApproval` class has been renamed to `Approval` and is used for `Deploy` as well as for the new `TransactionV1` model.
* `ActionThresholds` class has now new `UpgradeManagement` property.
* The `EntryPoint` class has new entry point types and a new property `EntryPointPayment`. Both apply when working with Casper 2.0 only.
* `Step` event from SSE contains a list of `Transform` objects instead of a `ExecutionEffect` instance.
* `FinalitySignature` event contains `BlockHeight` and `ChainNameHash` value when connected to a Casper 2.0 node.
* `DeployProcessed` event from SSE contains a `ExecutionResultV1` object instead of a `ExecutionResult` object.

### Deprecated

* `Proposer.isSystem` property is marked as Obsolete. Use `IsSystem` with capital `I` instead.

### Removed

* `GetAccountBalance()` method in the RPC client has been removed. Use `QueryBalance()` instead. `GetBalance()` method exists to use `state_get_balance` from the RPC interface if needed.

### Security

* BouncyCastle package updated to 2.4.0 version.

## [2.4.0]

### Changed
Expand Down Expand Up @@ -94,6 +182,9 @@ This new type permits to parse correctly the value `"00"` used for system blocks
### Added
* Initial release of Casper .NET SDK.

[3.0.0-beta3]: https://github.com/make-software/casper-net-sdk/releases/tag/v3.0.0-beta3
[3.0.0-beta2]: https://github.com/make-software/casper-net-sdk/releases/tag/v3.0.0-beta2
[3.0.0-beta1]: https://github.com/make-software/casper-net-sdk/releases/tag/v3.0.0-beta1
[2.3.0]: https://github.com/make-software/casper-net-sdk/releases/tag/v2.3.0
[2.2.0]: https://github.com/make-software/casper-net-sdk/releases/tag/v2.2.0
[2.1.0]: https://github.com/make-software/casper-net-sdk/releases/tag/v2.1.0
Expand Down
34 changes: 34 additions & 0 deletions Casper.Network.SDK.Test/AssertExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using NUnit.Framework;
using Org.BouncyCastle.Utilities.Encoders;

namespace NetCasperTest
{
public static class AssertExtensions
{
public static void IsHash(string maybeHash)
{
try
{
Assert.AreEqual(32, Hex.Decode(maybeHash).Length);
}
catch
{
Assert.Fail($"Cannot decode a hash from '{maybeHash}'");
}
}

public static void IsValidHex(string maybeHex, uint bytesLength = 0)
{
try
{
var bytes = Hex.Decode(maybeHex);
if(bytesLength > 0)
Assert.AreEqual(bytesLength, bytes.Length);
}
catch
{
Assert.Fail($"Cannot decode hex bytes from '{maybeHex}'");
}
}
}
}
53 changes: 0 additions & 53 deletions Casper.Network.SDK.Test/CEP57ChecksumTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,59 +24,6 @@ public void CEP57LongByteArray()
Assert.AreEqual(longHex.ToLower(), encodedHex);
}

[Test]
public void CEP57DecodeEncode()
{
int result;

var hash = "66B754c5E2981B41D41af39B88C8583bD08EF176eB1a81F56b8F395685805968";
var bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);

GlobalStateKey key = new HashKey(bytes);
Assert.AreEqual($"hash-{hash}", key.ToString());

hash = "eA1D6C19ccAeb35Ae717065c250E0F7F6Dc64AC3c6494a797E0b33A23CA1f1b9";
bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);
Assert.AreEqual(hash, CEP57Checksum.Encode(bytes));

key = new TransferKey(bytes);
Assert.AreEqual($"transfer-{hash}", key.ToString());

hash = "98d945f5324F865243B7c02C0417AB6eaC361c5c56602FD42ced834a1Ba201B6";
bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);
Assert.AreEqual(hash, CEP57Checksum.Encode(bytes));

key = new DeployInfoKey(bytes);
Assert.AreEqual($"deploy-{hash}", key.ToString());

hash = "8cf5E4aCF51f54Eb59291599187838Dc3BC234089c46fc6cA8AD17e762aE4401";
bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);
Assert.AreEqual(hash, CEP57Checksum.Encode(bytes));

key = new BalanceKey(bytes);
Assert.AreEqual($"balance-{hash}", key.ToString());

hash = "010c3Fe81B7b862E50C77EF9A958a05BfA98444F26f96f23d37A13c96244cFB7";
bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);
Assert.AreEqual(hash, CEP57Checksum.Encode(bytes));

key = new BidKey(bytes);
Assert.AreEqual($"bid-{hash}", key.ToString());

hash = "98d945f5324F865243B7c02C0417AB6eaC361c5c56602FD42ced834a1Ba201B6";
bytes = CEP57Checksum.Decode(hash, out result);
Assert.AreEqual(CEP57Checksum.ValidChecksum, result);
Assert.AreEqual(hash, CEP57Checksum.Encode(bytes));

key = new WithdrawKey(bytes);
Assert.AreEqual($"withdraw-{hash}", key.ToString());
}

[Test]
public void CEP57HasChecksum()
{
Expand Down
8 changes: 4 additions & 4 deletions Casper.Network.SDK.Test/CLValueJsonDeserializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void SerializeU512CLValue()
var doc = System.Text.Json.JsonDocument.Parse(json);
Assert.AreEqual(3, doc.RootElement.EnumerateObject().Count());
Assert.AreEqual("U512", doc.RootElement.GetProperty("cl_type").GetString());
Assert.AreEqual("05005550B405", doc.RootElement.GetProperty("bytes").GetString());
Assert.AreEqual("05005550b405", doc.RootElement.GetProperty("bytes").GetString().ToLower());
Assert.AreEqual("24500000000", doc.RootElement.GetProperty("parsed").GetString());

clValue = CLValue.U512(15000000000);
Expand Down Expand Up @@ -541,7 +541,7 @@ public void SerializeKeyCLValue()
Assert.IsNotEmpty(json);
Assert.IsTrue(json.Contains(@"""cl_type"":""Key"""));
Assert.IsTrue(json.Contains(@"""bytes"":""08b192"));
Assert.IsTrue(json.Contains(@"""parsed"":{""Withdraw"":""withdraw-B192"));
Assert.IsTrue(json.Contains(@"""parsed"":{""Withdraw"":""withdraw-b192"));

gsKey = GlobalStateKey.FromString(
"uref-e48935c79e96c490c01e1e8800de5ec5f4a857a57db0dcffed1e1e2b5d29b5e4-007");
Expand All @@ -550,9 +550,9 @@ public void SerializeKeyCLValue()
Assert.IsNotEmpty(json);
Assert.IsTrue(json.Contains(@"""cl_type"":""Key"""));
Assert.IsTrue(
json.Contains(@"""bytes"":""02e48935c79E96C490c01e1E8800dE5Ec5F4A857A57dB0DcFfED1e1E2b5d29b5E407"));
json.Contains(@"""bytes"":""02e48935c79e96c490c01e1e8800de5ec5f4a857a57db0dcffed1e1e2b5d29b5e407"));
Assert.IsTrue(json.Contains(
@"""parsed"":{""URef"":""uref-E48935C79E96c490c01e1E8800de5Ec5F4A857A57db0dcffEd1E1E2B5D29b5E4-007"));
@"""parsed"":{""URef"":""uref-e48935c79e96c490c01e1e8800de5ec5f4a857a57db0dcffed1e1e2b5d29b5e4-007"));

gsKey = GlobalStateKey.FromString("era-2685");
clValue = CLValue.Key(gsKey);
Expand Down
2 changes: 2 additions & 0 deletions Casper.Network.SDK.Test/Casper.Network.SDK.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Casper.Network.SDK.Test/DeployItemByteSerializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void StoredContractByHashSerialization()
new StoredContractByHashDeployItem(hash.ToHexString(),
"counter_inc");

Assert.AreEqual(CEP57Checksum.Encode(hash.RawBytes), storedContract.Hash);
Assert.AreEqual(Hex.ToHexString(hash.RawBytes), storedContract.Hash);
Assert.AreEqual("counter_inc", storedContract.EntryPoint);
Assert.IsNotNull(storedContract.RuntimeArgs);
Assert.AreEqual(0, storedContract.RuntimeArgs.Count);
Expand Down Expand Up @@ -71,7 +71,7 @@ public void StoredVersionedContractByHashSerialization()
var storedContract =
new StoredVersionedContractByHashDeployItem(hash.ToHexString(), 1, "counter_inc");

Assert.AreEqual(CEP57Checksum.Encode(hash.RawBytes), storedContract.Hash);
Assert.AreEqual(Hex.ToHexString(hash.RawBytes), storedContract.Hash);
Assert.AreEqual(1, storedContract.Version);
Assert.AreEqual("counter_inc", storedContract.EntryPoint);
Assert.IsNotNull(storedContract.RuntimeArgs);
Expand Down
2 changes: 1 addition & 1 deletion Casper.Network.SDK.Test/DeployJsonSerializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DeployJsonSerializer
private string deploy1 = TestContext.CurrentContext.TestDirectory + "/TestData/transfer-deploy.json";
private string signer1 = "017b8058863Aad49c7b89c77019ceF3a4D863BDf1c0c61499776F94b18465810F7";
private string signature1 =
"012a0c5896aB9D6Cf029268Cf454Ba9D42bcD40Bd909C984890F326739EeF13201d1d2a9a95938B2a966F2E650D1bDd80931F0374e3A92403e025B806Aa1065109";
"012a0c5896ab9d6cf029268cf454ba9d42bcd40bd909c984890f326739eef13201d1d2a9a95938b2a966f2e650d1bdd80931f0374e3a92403e025b806aa1065109";

[Test]
public void LoadDeployFromFileTest()
Expand Down
Loading