Implement bigDecimal host API (#62)

* Handle negative bigInt in store host API

* Increase size of bigInt in fromString API to support UInt256

* Implement bigDecimal divideBy host API

* Implement bigDecimal plus, minus and times host API

* Implement bigInt dividedByDecimal and mod host API

* Change BN js version to that used by ethers js
This commit is contained in:
prathamesh0
2021-12-28 16:08:05 +05:30
committed by nabarun
parent 129ba694fb
commit b04f6f2fba
5 changed files with 304 additions and 56 deletions
+7 -2
View File
@@ -17,7 +17,11 @@ export const getDummyEventData = (): EventData => {
stateRoot: ZERO_HASH,
td: ZERO_HASH,
txRoot: ZERO_HASH,
receiptRoot: ZERO_HASH
receiptRoot: ZERO_HASH,
uncleHash: ZERO_HASH,
difficulty: '0',
gasLimit: '0',
gasUsed: '0'
};
const tx = {
@@ -30,7 +34,8 @@ export const getDummyEventData = (): EventData => {
return {
block,
tx,
eventParams: [],
inputs: [],
event: {},
eventIndex: 0
};
};