-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/update grants data #67
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3892c1f
Update PostgreSQL configuration and adjust worker settings in Docker …
Douglasacost 398e9da
Update PostgreSQL configuration in Docker Compose; add optimized pg.c…
Douglasacost 7c1a062
Refactor error logging and improve contract fetching; update Docker C…
Douglasacost 4ac780a
Add start and end fields to VestingSchedule entities; update mappings…
Douglasacost f8ef701
Add event handlers for ERC20 approvals and update transfer topics in …
Douglasacost 8d90ed5
Add total field to VestingSchedule entity and calculate total amount …
Douglasacost 6445db7
Add additional endpoint for zKsync sepolia testnet in project configu…
Douglasacost ef02f62
Refactor PostgreSQL configuration for improved performance and resour…
Douglasacost 4bb7164
Merge branch 'main' into feat/update-grants-data
Douglasacost 76f8f5f
Merge branch 'main' into feat/update-grants-data
Douglasacost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Custom conf for 4GB RAM and 2-4 cores | ||
shared_buffers = 1GB | ||
work_mem = 12MB | ||
maintenance_work_mem = 128MB | ||
|
||
effective_cache_size = 3GB | ||
random_page_cost = 1.1 | ||
seq_page_cost = 1.0 | ||
|
||
max_connections = 50 | ||
max_worker_processes = 4 | ||
max_parallel_workers_per_gather = 2 | ||
max_parallel_workers = 4 | ||
|
||
autovacuum = on | ||
autovacuum_naptime = 20s | ||
autovacuum_vacuum_scale_factor = 0.2 | ||
autovacuum_analyze_scale_factor = 0.1 | ||
autovacuum_max_workers = 2 | ||
|
||
checkpoint_timeout = 10min | ||
checkpoint_completion_target = 0.7 | ||
max_wal_size = 2GB | ||
min_wal_size = 512MB | ||
|
||
logging_collector = on | ||
log_directory = 'pg_log' | ||
log_filename = 'postgresql-%Y-%m-%d.log' | ||
log_statement = 'none' | ||
log_min_duration_statement = 1000 | ||
|
||
# open as it is in a container | ||
listen_addresses = '*' | ||
port = 5432 | ||
|
||
# adjust depeding on the resources available | ||
parallel_setup_cost = 1000 | ||
parallel_tuple_cost = 0.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import { | |
SafeMintTransaction, | ||
} from "../types/abi-interfaces/ClickContentSignAbi"; | ||
import { fetchAccount, fetchMetadata, fetchTransaction } from "../utils/utils"; | ||
import { contractForSnapshot } from "../utils/const"; | ||
import { contractForSnapshot, nodleContracts } from "../utils/const"; | ||
import { TokenSnapshot, TokenSnapshotV2 } from "../types"; | ||
|
||
const keysMapping = { | ||
|
@@ -85,8 +85,9 @@ export async function handleApprovalForAll(event: ApprovalForAllLog) { | |
} | ||
|
||
export async function handleSafeMint(tx: SafeMintTransaction) { | ||
assert(tx.args, "No tx.args"); | ||
assert(tx.logs, "No tx.logs"); | ||
if (!tx.args || !tx.logs) { | ||
throw new Error("No tx.args or tx.logs"); | ||
} | ||
|
||
// Call to the contract | ||
const contract = await fetchContract(String(tx.to).toLowerCase()); | ||
|
@@ -123,12 +124,10 @@ export async function handleSafeMint(tx: SafeMintTransaction) { | |
|
||
token.uri = uri; | ||
|
||
if (false) { | ||
if (nodleContracts.includes(contract.id)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
const metadata = await fetchMetadata(uri, [ | ||
"nodle-community-nfts.myfilebase.com", | ||
"pinning.infura-ipfs.io", | ||
"nodle-web-wallet.infura-ipfs.io", | ||
"cloudflare-ipfs.com", | ||
"nodle-community-nfts.myfilebase.com/ipfs", | ||
"storage.googleapis.com/ipfs-backups", | ||
]); | ||
|
||
if (metadata) { | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's the sort of the changes that we need to reduce the unnecessary load from our indexers. Good job