Skip to content
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: add tip router merkle root upload support #128

Merged
merged 10 commits into from
Jan 17, 2025
3 changes: 3 additions & 0 deletions mev-programs/programs/sdk/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ pub struct ClaimArgs {
pub struct ClaimAccounts {
pub config: Pubkey,
pub tip_distribution_account: Pubkey,
pub merkle_root_upload_authority: Pubkey,
pub claim_status: Pubkey,
pub claimant: Pubkey,
pub payer: Pubkey,
Expand All @@ -264,6 +265,7 @@ pub fn claim_ix(program_id: Pubkey, args: ClaimArgs, accounts: ClaimAccounts) ->
let ClaimAccounts {
config,
tip_distribution_account,
merkle_root_upload_authority,
claim_status,
claimant,
payer,
Expand All @@ -281,6 +283,7 @@ pub fn claim_ix(program_id: Pubkey, args: ClaimArgs, accounts: ClaimAccounts) ->
accounts: jito_tip_distribution::accounts::Claim {
config,
tip_distribution_account,
merkle_root_upload_authority,
claimant,
claim_status,
payer,
Expand Down
146 changes: 146 additions & 0 deletions mev-programs/programs/tip-distribution/idl/jito_tip_distribution.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"name": "tip_distribution_account",
"writable": true
},
{
"name": "merkle_root_upload_authority",
"signer": true
},
{
"name": "claim_status",
"docs": [
Expand Down Expand Up @@ -213,6 +217,47 @@
}
]
},
{
"name": "initialize_merkle_root_upload_config",
"discriminator": [
232,
87,
72,
14,
89,
40,
40,
27
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "config",
"writable": true
},
{
"name": "authority",
"signer": true
},
{
"name": "merkle_root_upload_config",
"writable": true
},
{
"name": "system_program"
}
],
"args": [
{
"name": "authority",
"type": "pubkey"
}
]
},
{
"name": "initialize_tip_distribution_account",
"docs": [
Expand Down Expand Up @@ -270,6 +315,29 @@
}
]
},
{
"name": "migrate_tda_merkle_root_upload_authority",
"discriminator": [
13,
226,
163,
144,
56,
202,
214,
23
],
"accounts": [
{
"name": "tip_distribution_account",
"writable": true
},
{
"name": "merkle_root_upload_config"
}
],
"args": []
},
{
"name": "update_config",
"docs": [
Expand Down Expand Up @@ -307,6 +375,41 @@
}
]
},
{
"name": "update_merkle_root_upload_config",
"discriminator": [
128,
227,
159,
139,
176,
128,
118,
2
],
"accounts": [
{
"name": "config"
},
{
"name": "authority",
"signer": true
},
{
"name": "merkle_root_upload_config",
"writable": true
},
{
"name": "system_program"
}
],
"args": [
{
"name": "authority",
"type": "pubkey"
}
]
},
{
"name": "upload_merkle_root",
"docs": [
Expand Down Expand Up @@ -387,6 +490,19 @@
130
]
},
{
"name": "MerkleRootUploadConfig",
"discriminator": [
213,
125,
30,
192,
25,
121,
87,
33
]
},
{
"name": "TipDistributionAccount",
"discriminator": [
Expand Down Expand Up @@ -582,6 +698,11 @@
"code": 6014,
"name": "Unauthorized",
"msg": "Unauthorized signer."
},
{
"code": 6015,
"name": "InvalidTdaForMigration",
"msg": "TDA not valid for migration."
}
],
"types": [
Expand Down Expand Up @@ -827,6 +948,31 @@
]
}
},
{
"name": "MerkleRootUploadConfig",
"docs": [
"Singleton account that allows overriding TDA's merkle upload authority"
],
"type": {
"kind": "struct",
"fields": [
{
"name": "overide_authority",
"docs": [
"The authority that overrides the TipDistributionAccount merkle_root_upload_authority"
],
"type": "pubkey"
},
{
"name": "bump",
"docs": [
"The bump used to genearte this account"
],
"type": "u8"
}
]
}
},
{
"name": "MerkleRootUploadedEvent",
"type": {
Expand Down
Loading
Loading