-
Notifications
You must be signed in to change notification settings - Fork 0
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: validate horizon staking authorization during agent bootup #95
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1d0d9ae
feat: add service provider address to config
jahabeebs e6accab
chore: cleanup types and docs
jahabeebs f764db0
chore: cleanup docs
jahabeebs e5db40f
chore: cleanup docs
jahabeebs 0d7cd9d
fix: pr comments
jahabeebs 03dd45f
feat: draft changes to interface and abis
jahabeebs 54fbd3a
fix: pr comments
jahabeebs 43bfebb
Merge branch 'dev' into feat/grt-229-add-service-prov-address-to-config
jahabeebs 5b5d41b
Merge remote-tracking branch 'origin/feat/grt-229-add-service-prov-ad…
jahabeebs f55539f
Merge branch 'feat/grt-229-add-service-prov-address-to-config' into f…
jahabeebs fe57563
Merge remote-tracking branch 'origin/feat/grt-230-update-rpc-abis-and…
jahabeebs 32c8008
fix: as const
jahabeebs 7c3a506
feat: update rpc abis and behavior
jahabeebs 180ef4d
chore: cleanup
jahabeebs 46d0522
feat: validate horizon auth
jahabeebs 0d48ffe
fix: tests and refactoring
jahabeebs 8d4100f
Merge remote-tracking branch 'origin/dev' into feat/231-validate-hori…
jahabeebs 436c873
fix: tests and pr comments
jahabeebs 255da56
fix: pr comments
jahabeebs 0d5c57c
Merge branch 'dev' into feat/231-validate-horizon-auth-during-bootup
jahabeebs 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
export const horizonStakingAbi = [ | ||
{ | ||
type: "function", | ||
name: "addToProvision", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "verifier", type: "address", internalType: "address" }, | ||
{ name: "tokens", type: "uint256", internalType: "uint256" }, | ||
], | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
}, | ||
{ | ||
type: "function", | ||
name: "getProvision", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "verifier", type: "address", internalType: "address" }, | ||
], | ||
outputs: [ | ||
{ | ||
name: "", | ||
type: "tuple", | ||
internalType: "struct IHorizonStaking.Provision", | ||
components: [ | ||
{ name: "tokens", type: "uint256", internalType: "uint256" }, | ||
{ name: "tokensThawing", type: "uint256", internalType: "uint256" }, | ||
{ name: "sharesThawing", type: "uint256", internalType: "uint256" }, | ||
{ name: "maxVerifierCut", type: "uint32", internalType: "uint32" }, | ||
{ name: "thawingPeriod", type: "uint64", internalType: "uint64" }, | ||
{ name: "createdAt", type: "uint64", internalType: "uint64" }, | ||
{ name: "maxVerifierCutPending", type: "uint32", internalType: "uint32" }, | ||
{ name: "thawingPeriodPending", type: "uint64", internalType: "uint64" }, | ||
], | ||
}, | ||
], | ||
stateMutability: "view", | ||
}, | ||
{ | ||
type: "function", | ||
name: "isAuthorized", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "verifier", type: "address", internalType: "address" }, | ||
{ name: "operator", type: "address", internalType: "address" }, | ||
], | ||
outputs: [{ name: "", type: "bool", internalType: "bool" }], | ||
stateMutability: "view", | ||
}, | ||
{ | ||
type: "function", | ||
name: "provision", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "verifier", type: "address", internalType: "address" }, | ||
{ name: "tokens", type: "uint256", internalType: "uint256" }, | ||
{ name: "maxVerifierCut", type: "uint32", internalType: "uint32" }, | ||
{ name: "thawingPeriod", type: "uint64", internalType: "uint64" }, | ||
], | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
}, | ||
{ | ||
type: "function", | ||
name: "slash", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "tokens", type: "uint256", internalType: "uint256" }, | ||
{ name: "tokensVerifier", type: "uint256", internalType: "uint256" }, | ||
{ name: "verifierDestination", type: "address", internalType: "address" }, | ||
], | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
}, | ||
{ | ||
type: "function", | ||
name: "stake", | ||
inputs: [{ name: "tokens", type: "uint256", internalType: "uint256" }], | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
}, | ||
{ | ||
type: "function", | ||
name: "thaw", | ||
inputs: [ | ||
{ name: "serviceProvider", type: "address", internalType: "address" }, | ||
{ name: "verifier", type: "address", internalType: "address" }, | ||
{ name: "tokens", type: "uint256", internalType: "uint256" }, | ||
], | ||
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], | ||
stateMutability: "nonpayable", | ||
}, | ||
] 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
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
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.
just double checking that we want to exit the process right away
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.
yepp