Skip to content

Commit

Permalink
update subql to 2120 compatible (#631)
Browse files Browse the repository at this point in the history
* update subql to 2120 compatible

* update polkadot deps
  • Loading branch information
shunjizhan authored Jan 18, 2023
1 parent 271e0db commit efcdf54
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 252 deletions.
32 changes: 16 additions & 16 deletions evm-subql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"author": "Acala Developers <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@acala-network/eth-providers": "~2.5.9"
"@acala-network/eth-providers": "~2.5.10"
},
"devDependencies": {
"@subql/cli": "~1.10.0",
Expand All @@ -32,20 +32,20 @@
"typescript": "~4.6.3"
},
"resolutions": {
"@polkadot/api": "9.9.1",
"@polkadot/api-augment": "9.9.1",
"@polkadot/api-base": "9.9.1",
"@polkadot/api-derive": "9.9.1",
"@polkadot/keyring": "^10.1.13",
"@polkadot/rpc-augment": "9.9.1",
"@polkadot/rpc-core": "9.9.1",
"@polkadot/rpc-provider": "9.9.1",
"@polkadot/types": "9.9.1",
"@polkadot/types-augment": "9.9.1",
"@polkadot/types-codec": "9.9.1",
"@polkadot/types-create": "9.9.1",
"@polkadot/types-known": "9.9.1",
"@polkadot/util": "^10.1.13",
"@polkadot/util-crypto": "^10.1.13"
"@polkadot/api": "9.10.3",
"@polkadot/api-augment": "9.10.3",
"@polkadot/api-base": "9.10.3",
"@polkadot/api-derive": "9.10.3",
"@polkadot/rpc-augment": "9.10.3",
"@polkadot/rpc-core": "9.10.3",
"@polkadot/rpc-provider": "9.10.3",
"@polkadot/types-augment": "9.10.3",
"@polkadot/types-codec": "9.10.3",
"@polkadot/keyring": "^10.2.1",
"@polkadot/types": "9.10.3",
"@polkadot/types-create": "9.10.3",
"@polkadot/types-known": "9.10.3",
"@polkadot/util": "^10.2.1",
"@polkadot/util-crypto": "^10.2.1"
}
}
28 changes: 0 additions & 28 deletions evm-subql/project-karura-3280470.yaml

This file was deleted.

13 changes: 11 additions & 2 deletions evm-subql/src/mappings/mappingHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
PartialTransactionReceipt,
getTransactionIndexAndHash,
getEffectiveGasPrice,
findEvmEvent
findEvmEvent,
findTxFeeEvent
} from '@acala-network/eth-providers/lib/utils';
import { EventData } from '@acala-network/eth-providers/lib/base-provider';
import { BigNumber } from '@ethersproject/bignumber/lib/bignumber';
Expand Down Expand Up @@ -46,7 +47,15 @@ export async function handleEvmExtrinsic(
return;
}

const effectiveGasPrice = await getEffectiveGasPrice(evmEvent, global.unsafeApi, blockHash, extrinsic, actualWeight);
const txFeeEvent = findTxFeeEvent(extrinsicEvents);
const effectiveGasPrice = await getEffectiveGasPrice(
evmEvent,
txFeeEvent,
global.unsafeApi,
blockHash,
extrinsic,
actualWeight
);

const transactionInfo = {
transactionIndex: BigInt(transactionIndex),
Expand Down
Loading

0 comments on commit efcdf54

Please sign in to comment.