Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview4 to Preview5 Comparison #3

Open
wants to merge 69 commits into
base: preview4-untouched
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e8d08a5
Add ProtocolNotSupported to OracleResponseCode (#2164)
erikzhang Dec 17, 2020
13c626c
Rename native contracts (#2152)
erikzhang Dec 17, 2020
2cc1766
.NET 5.0 (#2083)
erikzhang Dec 17, 2020
cb03a1d
Remove System.Contract.Call (#2166)
erikzhang Dec 19, 2020
dfce481
Add System.Storage.FindKeys (#2169)
erikzhang Dec 21, 2020
c9df7a4
Remove Concat APIs (#2170)
erikzhang Dec 22, 2020
095d7f7
Allow to load store from a specified path (#2172)
erikzhang Dec 22, 2020
d970bb9
Remove Callback APIs (#2168)
erikzhang Dec 24, 2020
32513ed
upgrade package references (#2179)
Ashuaidehao Dec 25, 2020
5052317
Fix native parameters (#2183)
erikzhang Dec 27, 2020
91fb44c
Dynamic Call (#2167)
erikzhang Dec 28, 2020
6626b2b
Add MethodToken (#2185)
erikzhang Dec 28, 2020
198e9a6
Add native contract base class: NonfungibleToken (#2177)
erikzhang Dec 28, 2020
0e11886
Rename Nep17Token to FungibleToken (#2187)
erikzhang Dec 28, 2020
52a9122
Fix disposables in ApplicationEngine (#2191)
erikzhang Dec 29, 2020
bb66fda
Optimize ApplicationEngine.LoadScript() (#2186)
erikzhang Dec 30, 2020
6c5d44a
fix tx.verify (#2193)
Tommo-L Dec 30, 2020
59ea84b
Allow call native contracts with TriggerType.Verification (#2194)
erikzhang Dec 30, 2020
8f98ada
Simplify Iterator APIs (#2190)
erikzhang Jan 3, 2021
a054d6c
Fix name of method on ContractManagement (#2198)
vncoelho Jan 4, 2021
2c6d49b
Store NefFile in ContractState (#2195)
erikzhang Jan 5, 2021
36faae7
Add GetKey() in NonfungibleToken (#2199)
erikzhang Jan 5, 2021
83857d2
Allow plugins to send custom messages (#2101)
shargon Jan 6, 2021
c060455
Include EmitPush to ContractParameterType.Map in Helper (#2206)
meevee98 Jan 8, 2021
581a681
Remove PersistingBlock from snapshot (#2209)
erikzhang Jan 10, 2021
3ee76ba
LoadToken (#2200)
erikzhang Jan 10, 2021
b87df5d
Neo Name Service (#2201)
erikzhang Jan 10, 2021
d0a4976
Optimize dynamic call (#2211)
erikzhang Jan 10, 2021
dfb56a2
Automatically set Id for native contracts (#2210)
erikzhang Jan 10, 2021
a9fe75d
Use ExtensiblePayload in consensus (#2202)
erikzhang Jan 10, 2021
3d64080
Remove consensus (#2212)
erikzhang Jan 10, 2021
8b1509f
Send the persisting block to IPersistencePlugin (#2213)
erikzhang Jan 10, 2021
a3d97bc
Clean p2p plugin (#2216)
shargon Jan 12, 2021
c5a0a72
Fix AddService (#2221)
erikzhang Jan 13, 2021
58b2a0a
Set Admin to null after transfer (#2222)
erikzhang Jan 13, 2021
ea93441
Add IWalletProvider (#2223)
erikzhang Jan 13, 2021
6129c3b
NeoVM 3.0.0-CI00259 (#2224)
erikzhang Jan 13, 2021
cb70239
Fix FindOptions (#2231)
erikzhang Jan 14, 2021
df79b42
Fix the properties method of native nft contract (#2232)
erikzhang Jan 14, 2021
56bc2b1
Update vm (#2225)
shargon Jan 15, 2021
c018d01
Pass additional data to _deploy (#2239)
erikzhang Jan 15, 2021
91c956c
Disallow the modification of contract name (#2236)
erikzhang Jan 15, 2021
d9f7a3c
Merge the compiler and version fields of NefFile (#2235)
erikzhang Jan 15, 2021
39c1890
Allow method overloads (#2237)
erikzhang Jan 16, 2021
df7070d
Deterministic methods order for native contracts (#2241)
erikzhang Jan 17, 2021
14529e6
Add overloads on ContractManagement (#2242)
erikzhang Jan 19, 2021
4a4b16b
Add decimal constructor to BigInteger (#2246)
shargon Jan 19, 2021
dcde99e
update summary info (#2249)
bettybao1209 Jan 19, 2021
5f17eee
Change smart contract hash computation (#2240)
shargon Jan 19, 2021
8c72d54
Change the price of registerCandidate (#2252)
erikzhang Jan 19, 2021
d676fa7
Optimize BinarySerializer (#2253)
shargon Jan 20, 2021
7982856
Move everything into LedgerContract (#2215)
erikzhang Jan 21, 2021
62b7cb0
Add decimals to BigDecimal constructor (#2255)
shargon Jan 21, 2021
ba4896e
Change ContractManifest serialization (#2254)
erikzhang Jan 21, 2021
02fdcc6
Unify committee checks (#2258)
shargon Jan 22, 2021
6590c49
Check ip format (#2262)
erikzhang Jan 25, 2021
aaba978
Add NameService UT (#2261)
cloud8little Jan 25, 2021
677bd96
Add initial values for native contracts (#2265)
erikzhang Jan 26, 2021
5c88a99
Check script and abi when deploying contracts (#2263)
erikzhang Jan 27, 2021
7938b93
Add tokens to NFT native contract (#2271)
erikzhang Jan 27, 2021
234350d
Remove currentSnapshot (#2273)
erikzhang Jan 28, 2021
9770748
Check all transactions and witnesses (#2266)
erikzhang Jan 28, 2021
87856b9
Fix first contract id (#2277)
shargon Jan 28, 2021
f503027
Fix tx attributes (#2276)
shargon Jan 28, 2021
b9dfe52
Add test mode gas (#2278)
bettybao1209 Jan 29, 2021
6285ee1
Fix tokens in nns (#2286)
bettybao1209 Feb 2, 2021
bbb458d
onNEP[*]Payment (#2287)
erikzhang Feb 2, 2021
9340b30
Add header back (#2259)
Qiao-Jin Feb 3, 2021
604541c
Preview5 (#2288)
erikzhang Feb 3, 2021
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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
DOTNET_VERSION: 3.1.402
DOTNET_VERSION: 5.0.100

jobs:

Expand All @@ -21,8 +21,8 @@ jobs:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Check format
run: |
dotnet tool install --version 3.2.111002 --tool-path ./ dotnet-format --add-source https://dotnet.myget.org/F/format/api/v3/index.json
./dotnet-format --check --dry-run -v diagnostic
dotnet tool install --version 5.0.142902 --tool-path ./ dotnet-format --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
./dotnet-format --check -v diagnostic
- name: Test
run: |
find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
Expand Down
29 changes: 29 additions & 0 deletions src/neo/BigDecimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,41 @@ public struct BigDecimal
public byte Decimals => decimals;
public int Sign => value.Sign;

/// <summary>
/// Create BigDecimal from BigInteger
/// </summary>
/// <param name="value">Value</param>
/// <param name="decimals">Decimals</param>
public BigDecimal(BigInteger value, byte decimals)
{
this.value = value;
this.decimals = decimals;
}

/// <summary>
/// Create BigDecimal from decimal
/// </summary>
/// <param name="value">Value</param>
public unsafe BigDecimal(decimal value)
{
ReadOnlySpan<byte> buffer = new ReadOnlySpan<byte>(&value, sizeof(decimal));
this.decimals = buffer[14];
this.value = new BigInteger(decimal.Multiply((decimal)Math.Pow(10, decimals), value));
}

/// <summary>
/// Create BigDecimal from decimal
/// </summary>
/// <param name="value">Value</param>
/// <param name="decimals">Decimals</param>
public unsafe BigDecimal(decimal value, byte decimals)
{
ReadOnlySpan<byte> buffer = new ReadOnlySpan<byte>(&value, sizeof(decimal));
if (buffer[14] > decimals) throw new ArgumentException(null, nameof(value));
this.value = new BigInteger(decimal.Multiply((decimal)Math.Pow(10, decimals), value));
this.decimals = decimals;
}

public BigDecimal ChangeDecimals(byte decimals)
{
if (this.decimals == decimals) return this;
Expand Down
44 changes: 0 additions & 44 deletions src/neo/Consensus/ChangeView.cs

This file was deleted.

12 changes: 0 additions & 12 deletions src/neo/Consensus/ChangeViewReason.cs

This file was deleted.

26 changes: 0 additions & 26 deletions src/neo/Consensus/Commit.cs

This file was deleted.

Loading