-
Notifications
You must be signed in to change notification settings - Fork 9
Surge gameplay iteration stage #205
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
Open
gwalen
wants to merge
17
commits into
dev-solana-v2
Choose a base branch
from
surge-gameplay-iteration-stage
base: dev-solana-v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8032414
refactor FeesManager to handle solana - part 1
gwalen 1387f9a
Add coments and rename variables
gwalen 24c9e7b
Hardcode solana trasmitter key address in _createSolanaDigestParams()…
gwalen c101bf4
Fixes for deployment scripts; linter changes; deployment files
gwalen 9128bac
changes to make socket counter example works
gwalen 2564360
Add to foundry.toml yul optimizers to avoid stack-too-deep errors
gwalen 06fde41
Add script to update fowarder solana and all necessary changes
gwalen 0e73d38
Wip - add add events to log Configurations.verifyConnections(), add a…
gwalen 26a45f4
Change FeePool addresss for local to dev (deployment); Add debug even…
gwalen 9671282
Add Solana Evm libs to socket-protocol; modify FeesManager and Credit…
gwalen ff7a972
change setSusdcToken() to handle Solana; change IReceiver.onTransfer(…
gwalen 14b528f
Fix createSusdcMintInstructionSolana(); add funding feeManager so tha…
gwalen bcf0479
Add FesPlugSolana setter for in FeesManager/Credit; add deployment sc…
gwalen 0723eb4
Revert changes for testing Solana forwarder calls in isolation
gwalen d4af2bf
Wip deployment
gwalen ec7595d
fix: some changes to setup and deployment scripts: deployment trouble…
gwalen c197024
fix: hardcode the new transmitter Solana key in WritePrecompile; add …
gwalen 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 hidden or 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 |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ src/types | |
| typechain-types/ | ||
|
|
||
| .env | ||
| .env.* | ||
| .DS_Store | ||
|
|
||
| .gas-snapshot/ | ||
|
|
||
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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.
Ensure creditHolder_ matches request.consumeFrom to avoid accounting mismatches.
blockCredits writes to blockedCredits[creditHolder_] but unblock uses consumeFrom from request params. If they differ, unblock will underflow or corrupt balances. This should validate the invariant at block time.
function blockCredits( uint40 requestCount_, address creditHolder_, uint256 credits_ ) external override onlyRequestHandler { - if (balanceOf(creditHolder_) < credits_) revert InsufficientCreditsAvailable(); + address consumeFrom = _getRequestParams(requestCount_).requestFeesDetails.consumeFrom; + if (creditHolder_ != consumeFrom) revert("creditHolder mismatch"); + if (balanceOf(consumeFrom) < credits_) revert InsufficientCreditsAvailable(); - blockedCredits[creditHolder_] += credits_; + blockedCredits[consumeFrom] += credits_; requestBlockedCredits[requestCount_] = credits_; - emit CreditsBlocked(requestCount_, creditHolder_, credits_); + emit CreditsBlocked(requestCount_, consumeFrom, credits_); }Also applies to: 123-139
🤖 Prompt for AI Agents