-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from 0xsend/bb/shovel-add-send-revenues-safe-…
…receives shovel: add send revenues safe received
- Loading branch information
Showing
13 changed files
with
345 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
packages/shovel/src/integrations/send-revenues-safe-receives.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import type { BlockData, Column, Integration, Table } from '@indexsupply/shovel-config' | ||
import { sendRevenueSafeAddress } from '@my/wagmi' | ||
|
||
export const sendRevenuesSafeReceivesTable: Table = { | ||
name: 'send_revenues_safe_receives', | ||
columns: [ | ||
{ name: 'chain_id', type: 'numeric' }, | ||
{ name: 'log_addr', type: 'bytea' }, | ||
{ name: 'block_time', type: 'numeric' }, | ||
{ name: 'tx_hash', type: 'bytea' }, | ||
{ name: 'sender', type: 'bytea' }, | ||
{ name: 'v', type: 'numeric' }, | ||
] as Column[], | ||
} as const | ||
|
||
export const integration: Omit<Integration, 'sources'> = { | ||
name: 'send_revenues_safe_receives', | ||
enabled: true, | ||
table: sendRevenuesSafeReceivesTable, | ||
block: [ | ||
{ | ||
name: 'chain_id', | ||
column: 'chain_id', | ||
}, | ||
{ | ||
name: 'block_time', | ||
column: 'block_time', | ||
}, | ||
{ | ||
name: 'tx_hash', | ||
column: 'tx_hash', | ||
}, | ||
{ | ||
name: 'log_addr', | ||
column: 'log_addr', | ||
filter_op: 'contains', | ||
filter_arg: [...new Set(Object.values(sendRevenueSafeAddress))].sort(), | ||
}, | ||
] as BlockData[], | ||
event: { | ||
type: 'event', | ||
name: 'SafeReceived', | ||
inputs: [ | ||
{ | ||
name: 'sender', | ||
internalType: 'address', | ||
type: 'address', | ||
indexed: true, | ||
column: 'sender', | ||
}, | ||
{ | ||
name: 'value', | ||
type: 'uint256', | ||
indexed: false, | ||
column: 'v', | ||
}, | ||
], | ||
}, | ||
} as const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.