CityOfZion / neon-js

Javascript libraries that allow the applications to interact with NEO blockchain
https://docs.coz.io/neo3/neon-js/index.html
MIT License
183 stars 166 forks source link

Shouldn't default AddressVersion be 53 not 23? #858

Closed devhawk closed 2 years ago

devhawk commented 2 years ago

ProtocolSettings in Neo C# project sets the default address version to hex value 0x35 which is 53 in decimal

public static ProtocolSettings Default { get; } = new ProtocolSettings
{
    Network = 0x334F454Eu,
    AddressVersion = 0x35,
    // remaining initialization code omitted

Neon.JS appears to be using 23 as the default instead of 53:

https://github.com/CityOfZion/neon-js/blob/0ee44d4b33a8ce5ae7b46d78c58c8a62c7e96900/packages/neon-core/src/rpc/Protocol.ts#L43

ixje commented 2 years ago

that's definitely a NEO2 leftover https://github.com/neo-project/neo/blob/0b6526e8df49004fc7c069982084b7f0bcb44f6f/neo/ProtocolSettings.cs#L53