Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into deploy-module-example
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Feb 6, 2024
2 parents 6cf2838 + c5deb35 commit 455a6b8
Show file tree
Hide file tree
Showing 59 changed files with 932 additions and 146 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
rustfmt:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +29,7 @@ jobs:
rustclippy-build-test:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
publish-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

jobs:
build-native-ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:

build-and-release:
needs: [build-native-ubuntu, build-native-macos, build-native-windows]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: release

steps:
Expand Down
25 changes: 18 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
## Unreleased changes
- Added
- New GRPC-endpoint: `GetBlockItems`
- New transaction `DeployModule`
- The function `Prepare` has been removed from the `AccountTransactionPayload` class, but is implemented for all subclasses except `RawPayload`.
- Added serialization and deserialization for all instances of `AccountTransactionPayload`

- Breaking
- The function `GetTransactionSpecificCost` has been removed from the `AccountTransactionPayload` class.
## 4.3.1
- Added
- Enhanced error handling for FFI calls and exposing detailed exceptions to the client, providing information about potential errors.

## 4.3.0
- Bugfix
- Switched the GitHub runners from using 'ubuntu-latest' to 'ubuntu-20.04' to ensure compatibility with the default .NET 6 Docker image for the SDK.
- Added
- New GRPC-endpoint: `GetBlockItems`
- New transactions: `DeployModule` and `UpdateContract`.
- The function `Prepare` has been removed from the `AccountTransactionPayload` class, but is implemented for all subclasses except `RawPayload`.
- Added serialization and deserialization for all instances of `AccountTransactionPayload`
- Minor breaking change:
- The function `GetTransactionSpecificCost` has been removed from the `AccountTransactionPayload` class.

## 4.2.1
- Bugfix
- Fix wrong build of rust dependencies which made the interops call not work on iOS.

## 4.2.0
- Deserialization from module schema
Expand Down
19 changes: 13 additions & 6 deletions ConcordiumNetSdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetBranches", "examples\Get
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetFinalizedBlocks", "examples\GetFinalizedBlocks\GetFinalizedBlocks.csproj", "{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeployModule", "examples\DeployModule\DeployModule.csproj", "{79B760E5-E853-4928-A76E-CCE825B59DF6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Transations.UpdateContract", "examples\UpdateContract\Transations.UpdateContract.csproj", "{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeployModule", "examples\DeployModule\DeployModule.csproj", "{D35681A3-04AE-41BA-86F3-3CF5369D6D97}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -229,10 +231,14 @@ Global
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Release|Any CPU.Build.0 = Release|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Release|Any CPU.Build.0 = Release|Any CPU
{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266}.Release|Any CPU.Build.0 = Release|Any CPU
{D35681A3-04AE-41BA-86F3-3CF5369D6D97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D35681A3-04AE-41BA-86F3-3CF5369D6D97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D35681A3-04AE-41BA-86F3-3CF5369D6D97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D35681A3-04AE-41BA-86F3-3CF5369D6D97}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -275,6 +281,7 @@ Global
{79E97788-D084-487E-8F34-0BA1911C452A} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{26417CD7-2897-47BA-BA9B-C4475187331A} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{79B760E5-E853-4928-A76E-CCE825B59DF6} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{DBFBB7D1-E82D-4380-8263-B4B0AC3A6266} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{D35681A3-04AE-41BA-86F3-3CF5369D6D97} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
EndGlobalSection
EndGlobal
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ Currently, helpers for working with transactions of the [`Transfer`](http://deve

- .NET Framework: 6.0 or later.
- Concordium Node version compatibility: 6.*
- On macOS currently only dotnet x86 runtimes are supported.

## Installation

The SDK is published on [nuget.org](https://www.nuget.org/packages/ConcordiumNetSdk). Depending on your setup, it can be added to your project as a dependency by running either

```powershell
PM> Install-Package Concordium.SDK -Version 4.2
PM> Install-Package Concordium.SDK -Version 4.3
```
or

Expand Down
2 changes: 1 addition & 1 deletion concordium-base
Submodule concordium-base updated 187 files
2 changes: 1 addition & 1 deletion examples/GetAccountInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetAccountInfo;
internal sealed class GetAccountInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetAccountList/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetAccountList;
internal sealed class GetAccountListOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetAncestors/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetAncestors;
internal sealed class GetAncestorsOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
[Option(
'm',
Expand Down
2 changes: 1 addition & 1 deletion examples/GetBakerList/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBakerList;
internal sealed class GetBakerListOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockChainParameters/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace GetBlockChainParameters;
internal sealed class GetBlockChainParametersOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockFinalizationSummary/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlockFinalizationSummary;
internal sealed class GetBlockFinalizationSummaryOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlockInfo;
internal sealed class GetBlockInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBlockItemStatus/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal sealed class GetBlockItemSummaryOptions
[Option(HelpText = "Transaction hash to lookup", Required = true)]
public string TransactionHash { get; set; }

[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.", Default = "http://node.testnet.concordium.com:20000")]
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.", Default = "http://grpc.testnet.concordium.com:20000")]
public string Endpoint { get; set; }
}

Expand All @@ -37,7 +37,7 @@ public static class Program
/// An example showing how one can query transaction status from a node.
/// </summary>
/// <param name="args">GetBlockItemSummaryOptions
/// Example: --endpoint http://node.testnet.concordium.com:20000 --transactionhash 143ca4183d0bb204000ad08e0fd5792985c808861b97f3b81cb9016ad39d09d2
/// Example: --endpoint http://grpc.testnet.concordium.com:20000 --transactionhash 143ca4183d0bb204000ad08e0fd5792985c808861b97f3b81cb9016ad39d09d2
/// </param>
public static async Task Main(string[] args)
{
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBlockItems/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlockItems;
internal sealed class GetBlocksOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
[Option(
'b',
Expand All @@ -38,7 +38,7 @@ private static async Task Run(GetBlocksOptions o)
IBlockHashInput bi = o.BlockHash != null ? new Given(BlockHash.From(o.BlockHash)) : new LastFinal();

var blockItems = await client.GetBlockItems(bi);

Console.WriteLine($"All block items in block {blockItems.BlockHash}: [");
await foreach (var item in blockItems.Response)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockPendingUpdates/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlockPendingUpdates;
internal sealed class GetBlockPendingUpdatesOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
[Option(
'b',
Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockSpecialEvents/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlockSpecialEvents;
internal sealed class GetBlockSpecialEventsOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlockTransactionEvents/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace GetBlockTransactionEvents;
internal sealed class GetBlockTransactionEventsOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlocks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace GetBlocks;
internal sealed class GetBlocksOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBlocksAtHeight/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBlocksAtHeight;
internal sealed class GetBlocksAtHeightOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetBranches/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetBranches;
internal sealed class GetBranchesOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetConsensusInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace GetConsensusInfo;
internal sealed class GetConsensusInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetFinalizedBlocks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace GetFinalizedBlocks;
internal sealed class GetFinalizedBlocksOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetIdentityProviders/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetIdentityProviders;
internal sealed class GetIdentityProvidersOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetInstanceInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace GetInstanceInfo;
internal sealed class GetInstanceInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetInstanceList/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetInstanceList;
internal sealed class GetInstanceListOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetModuleList/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetModuleList;
internal sealed class GetModuleListOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetModuleSource/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetModuleSource;
internal sealed class GetModuleSourceOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetNodeInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace GetNodeInfo;
internal sealed class GetNodeInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion examples/GetPassiveDelegationInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetPassiveDelegationInfo;
internal sealed class GetPassiveDelegationInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetPoolInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace GetPoolInfo;
internal sealed class GetPoolInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
2 changes: 1 addition & 1 deletion examples/GetTokenomicsInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace GetTokenomicsInfo;
internal sealed class GetTokenomicsInfoOptions
{
[Option(HelpText = "URL representing the endpoint where the gRPC V2 API is served.",
Default = "http://node.testnet.concordium.com:20000/")]
Default = "http://grpc.testnet.concordium.com:20000/")]
public string Endpoint { get; set; }

[Option(
Expand Down
Loading

0 comments on commit 455a6b8

Please sign in to comment.