Closed xie-yue closed 1 year ago
seems like missed parseInt
, result of ss.read(1)
is a string
I'll have a look a.s.a.p
Expect a PR later in the day (European timezone) fixing this and some other issue I encountered
@xie-yue see the PR :point_up: Note: a new release might not happen until after the weekend. Waiting for the maintainer approval on the PR
I think I may be having some related errors when it comes to tx serialization. I did a little bit of light testing. With tx.serialize()
and only the validUntilBlock
property set, I get the expected hexstring. A few others serialize fine too, like fees.
Trying with only signers
added gave:
prop.map((p) => (typeof p === "string" ? p : p.serialize())).join(""));
^
TypeError: p.serialize is not a function
Trying with only script
added gave:
throw new Error(`num2hexstring expected a number but got ${typeof num} instead.`);
^
Error: num2hexstring expected a number but got undefined instead.
Opened as new issue #875.
worked perfectly! thx!
v5.2.0 neo3 neon-core/lib/tx/components/WitnessRule
serialize() { return (this.action.toString(16).padStart(2, "0") + this.condition.serialize()); }
static deserialize(ss) { const action = parseEnum(ss.read(1), WitnessRuleAction); ... }
in deserialize, the first param
ss.read(1)
will be 01 (Allow) witch was not defined inWitnessRuleAction
. throw an error01 not found in enum!