Closed CedarMist closed 2 months ago
Name | Link |
---|---|
Latest commit | b323d9d4a7b081e545230be08a01c505f21ad668 |
Latest deploy log | https://app.netlify.com/sites/oasisprotocol-sapphire-paratime/deploys/66e8139b44fc9800095c3410 |
So, we have a build bug with bigint literals:
Error: src/calldatapublickey.ts(59,46): error TS2737: BigInt literals are not available when targeting lower than ES2020.
e.g.
return bytes.reduce((acc, byte) => (acc << 8n) | BigInt(byte), 0n);
Not sure if we should change the target, or remove the bigint literals. I'm surprised we haven't seen this bug before. The place it's being used is for manual parsing of uint256 from abi results (so as to not pull in a full ABI decoding library). The expected values are going to be small, and certainly within a Javascript Number's safe-int-range
So, we have a build bug with bigint literals:
Error: src/calldatapublickey.ts(59,46): error TS2737: BigInt literals are not available when targeting lower than ES2020.
e.g.
return bytes.reduce((acc, byte) => (acc << 8n) | BigInt(byte), 0n);
Not sure if we should change the target, or remove the bigint literals. I'm surprised we haven't seen this bug before. The place it's being used is for manual parsing of uint256 from abi results (so as to not pull in a full ABI decoding library). The expected values are going to be small, and certainly within a Javascript Number's safe-int-range
I think I'm comfortable going up.
Fixes #367
This requires Sapphire 0.8 on mainnet before the package can be published.