Skip to content

Commit

Permalink
chore: Remove unused decoded value for ERC-20.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomenezes committed Jan 14, 2024
1 parent b765738 commit 37c2f98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/InputAdded.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BlockData, DataHandlerContext, Log } from '@subsquid/evm-processor';
import { Store } from '@subsquid/typeorm-store';
import { dataSlice, getNumber, getUint } from 'ethers';
import { dataSlice, getUint } from 'ethers';
import { Contract as ERC20 } from '../abi/ERC20';
import { Contract as ERC721 } from '../abi/ERC721';
import { events } from '../abi/InputBox';
Expand Down Expand Up @@ -45,7 +45,7 @@ export default class InputAdded implements Handler {
) {
if (input.msgSender !== ERC20PortalAddress) return undefined;

const success = getNumber(dataSlice(input.payload, 0, 1)) == 1; // 1 byte for boolean (not used?)
// first byte is a boolean and not used here at the moment
const tokenAddress = dataSlice(input.payload, 1, 21).toLowerCase(); // 20 bytes for address
const from = dataSlice(input.payload, 21, 41).toLowerCase(); // 20 bytes for address
const amount = getUint(dataSlice(input.payload, 41, 73)); // 32 bytes for uint256
Expand Down

0 comments on commit 37c2f98

Please sign in to comment.