diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4eb07f5e..2b136cf7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,12 +12,14 @@ jobs: fetch-depth: 0 - name: Setup .NET Core uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' - name: Setup Node uses: actions/setup-node@v2 with: node-version: '14' - name: Install nbgv - run: dotnet tool install nbgv --tool-path ./tools --version 3.3.37 + run: dotnet tool install nbgv --tool-path ./tools - name: Run nbgv run: echo "NUGET_PACKAGE_VERSION=$(./tools/nbgv get-version -v NuGetPackageVersion)" >> $GITHUB_ENV - name: Install dependencies diff --git a/eng/azure-ci.yml b/eng/azure-ci.yml index f6177f5e..f0c0b61b 100644 --- a/eng/azure-ci.yml +++ b/eng/azure-ci.yml @@ -2,7 +2,7 @@ variables: configuration: release pool: - vmImage: 'windows-2019' + vmImage: 'ubuntu-20.04' trigger: batch: false @@ -23,7 +23,7 @@ steps: displayName: 'use .NET Core SDK from global.json' inputs: packageType: 'sdk' - useGlobalJson: true + version: '5.0.x' - script: dotnet --list-sdks displayName: list sdks diff --git a/readme.md b/readme.md index cbae5c82..fb11bc84 100644 --- a/readme.md +++ b/readme.md @@ -16,10 +16,10 @@ The debug information format is [fully documented](https://github.com/ngdseattle This format is supported by a variety of Neo smart contract compilers including * [NEON (C#)](https://github.com/neo-project/neo-devpack-dotnet) -* [neo3wj (Java/Kotlin/Android)](https://neow3j.io/) +* [neow3j (Java/Kotlin/Android)](https://neow3j.io) * [neo-boa (Python)](https://github.com/CityOfZion/neo-boa) * [NeoGo (GoLang)](https://github.com/nspcc-dev/neo-go) -* [NEO•ONE (TypeScript)](https://neo-one.io/) +* [NEO•ONE (TypeScript)](https://neo-one.io) As of version 2.0, the Neo Smart Contract Debugger supports both [Neo N3 and Neo Legacy](https://medium.com/neo-smart-economy/introducing-neo-n3-the-next-evolution-of-the-neo-blockchain-b2960c4def6e). diff --git a/src/adapter3/DebugSession.cs b/src/adapter3/DebugSession.cs index e02444bf..2f472691 100644 --- a/src/adapter3/DebugSession.cs +++ b/src/adapter3/DebugSession.cs @@ -301,6 +301,7 @@ static bool TryEvaluateNamedSlot(IReadOnlyList slot, IReadOnlyList.Empty; - using (var snapshot = new SnapshotCache(store)) - { - deployedContracts = NativeContract.ContractManagement.ListContracts(snapshot) - .ToImmutableDictionary( - contract => contract.Manifest.Name, - contract => contract.Hash); - } + ContractParameterParser.TryGetUInt160 tryGetContract = (string name, out UInt160 scriptHash) => + { + using var snapshot = new SnapshotCache(store); + foreach (var contract in NativeContract.ContractManagement.ListContracts(snapshot)) + { + if (contract.Manifest.Name.Equals(name)) + { + scriptHash = contract.Hash; + return true; + } + } + + scriptHash = null!; + return false; + }; ContractParameterParser.TryGetUInt160? tryGetAccount = chain == null ? null @@ -291,7 +299,7 @@ static ContractParameterParser CreateContractParameterParser(byte addressVersion return false; }; - return new ContractParameterParser(addressVersion, tryGetAccount, deployedContracts.TryGetValue); + return new ContractParameterParser(addressVersion, tryGetAccount, tryGetContract); } static (int id, UInt160 scriptHash) EnsureContractDeployed(IStore store, NefFile nefFile, ContractManifest manifest, Signer deploySigner, ProtocolSettings settings) @@ -378,14 +386,7 @@ static void OnDeploy(ContractState contract, Signer deploySigner, DataCache snap var deployMethod = contract.Manifest.Abi.GetMethod("_deploy", 2); if (deployMethod is not null) { - var tx = new Transaction - { - Attributes = Array.Empty(), - Script = Array.Empty(), - Signers = new[] { deploySigner }, - Witnesses = Array.Empty() - }; - + var tx = TestApplicationEngine.CreateTestTransaction(deploySigner); using (var engine = ApplicationEngine.Create(TriggerType.Application, tx, snapshot, null, settings)) { var context = engine.LoadContract(contract, deployMethod, CallFlags.All); diff --git a/src/adapter3/neodebug-3-adapter.csproj b/src/adapter3/neodebug-3-adapter.csproj index 0492d29b..ab99b366 100644 --- a/src/adapter3/neodebug-3-adapter.csproj +++ b/src/adapter3/neodebug-3-adapter.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/extension/package-lock.json b/src/extension/package-lock.json index d8edd312..8d365177 100644 --- a/src/extension/package-lock.json +++ b/src/extension/package-lock.json @@ -761,9 +761,9 @@ } }, "css-what": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.0.tgz", - "integrity": "sha512-qxyKHQvgKwzwDWC/rGbT821eJalfupxYW2qbSJSAtdSTimsr/MlaGONoNLllaUPZWf8QnbcKM/kPVYUQuEKAFA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", "dev": true }, "d": {