Comparing version 0.0.53 to 0.0.54
import { PermissionLevel, Action } from "./action" | ||
import { SecondaryValue, newSecondaryValue_u64, IDXDB } from "./idxdb" | ||
import { MultiIndex, MultiIndexValue } from "./mi" | ||
import { Name } from "./name" | ||
import { Name, EMPTY_NAME } from "./name" | ||
import { Packer } from "./serializer" | ||
@@ -136,3 +136,3 @@ import { check } from "./system" | ||
static new(_: Name, __: Name): MultiIndex<Table> { | ||
static new(_: Name, __: Name = EMPTY_NAME): MultiIndex<Table> { | ||
check(false, "not implemented"); | ||
@@ -139,0 +139,0 @@ // @ts-ignore |
@@ -80,3 +80,3 @@ export { U128, U256, I128 } from "./bignum"; | ||
export { Name } from "./name"; | ||
export { Name, EMPTY_NAME } from "./name"; | ||
export { Action, PermissionLevel } from "./action"; | ||
@@ -83,0 +83,0 @@ export { Asset, ExtendedAsset, Symbol, SymbolCode, ExtendedSymbol, isValid } from "./asset"; |
@@ -21,5 +21,5 @@ import { IDXDB, SecondaryValue, SecondaryIterator } from "./idxdb"; | ||
constructor(code: Name, scope: Name, table: Name, indexes: Array<IDXDB> = []) { | ||
constructor(code: Name, scope: Name, table: Name, indices: Array<IDXDB> = []) { | ||
this.db = new DBI64(code.N, scope.N, table.N); | ||
this.idxdbs = indexes; | ||
this.idxdbs = indices; | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -214,2 +214,4 @@ import { Decoder, Packer } from "./serializer"; | ||
} | ||
} | ||
} | ||
export const EMPTY_NAME = new Name(); |
@@ -36,3 +36,5 @@ import { Name } from "./name"; | ||
checkPos(n: usize): void { | ||
check(this.pos + n <= <u32>this.buf.length, `checkPos: buffer overflow`); | ||
if (this.pos + n > <u32>this.buf.length) { | ||
check(false, `checkPos: buffer overflow`); | ||
} | ||
} | ||
@@ -42,3 +44,5 @@ | ||
this.pos += n; | ||
check(this.pos <= <u32>this.buf.length, `incPos: buffer overflow`); | ||
if (this.pos > <u32>this.buf.length) { | ||
check(false, `incPos: buffer overflow`); | ||
} | ||
} | ||
@@ -156,3 +160,5 @@ | ||
this.pos += n; | ||
check(this.pos <= <u32>this.buf.length, "Decoder.incPos: buffer overflow"); | ||
if (this.pos > <u32>this.buf.length) { | ||
check(false, "Decoder.incPos: buffer overflow"); | ||
} | ||
} | ||
@@ -159,0 +165,0 @@ |
@@ -5,6 +5,8 @@ import * as env from "./env"; | ||
export function assert(test: bool, msg: string): void { | ||
if (test) { | ||
return; | ||
} | ||
let s1 = String.UTF8.encode(msg, true); | ||
let dv = new DataView(s1); | ||
let _test = test ? 1 : 0; | ||
env.eosio_assert(_test, dv.dataStart); | ||
env.eosio_assert(0, dv.dataStart); | ||
} | ||
@@ -11,0 +13,0 @@ |
{ | ||
"name": "as-chain", | ||
"version": "0.0.53", | ||
"version": "0.0.54", | ||
"description": "chain module for assemblyscript", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1565523
6422