private static AccountState Convert(AccountStateJson accountStateJson) { AccountState state = new AccountState(); state.Balance = Bytes.FromHexString(accountStateJson.Balance).ToUInt256(); state.Code = Bytes.FromHexString(accountStateJson.Code); state.Nonce = Bytes.FromHexString(accountStateJson.Nonce).ToUInt256(); state.Storage = accountStateJson.Storage.ToDictionary( p => Bytes.FromHexString(p.Key).ToUInt256(), p => Bytes.FromHexString(p.Value)); return(state); }
private static AccountState Convert(AccountStateJson accountStateJson) { AccountState state = new AccountState(); state.Balance = Hex.ToBytes(accountStateJson.Balance).ToUnsignedBigInteger(); state.Code = Hex.ToBytes(accountStateJson.Code); state.Nonce = Hex.ToBytes(accountStateJson.Nonce).ToUnsignedBigInteger(); state.Storage = accountStateJson.Storage.ToDictionary( p => Hex.ToBytes(p.Key).ToUnsignedBigInteger(), p => Hex.ToBytes(p.Value)); return(state); }