Skip to content

Commit

Permalink
chore: remove v2 from crate name (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco authored Jan 3, 2025
1 parent e0612cc commit d54aa11
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 41 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
working-directory: rust/
run: |
cargo build
cargo test
- name: npm run build
working-directory: ts/
Expand Down
42 changes: 21 additions & 21 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.4"
version = "0.2.0"
authors = ["Magicblock Labs <[email protected]>"]
edition = "2021"
license = "MIT"
Expand All @@ -21,9 +21,9 @@ readme = "../README.md"
keywords = ["solana", "crypto", "delegation", "ephemeral-rollups", "magicblock"]

[workspace.dependencies]
ephemeral-rollups-sdk-attribute-ephemeral-v2 = { path = "ephemeral", version = "=0.1.4" }
ephemeral-rollups-sdk-attribute-delegate-v2 = { path = "delegate", version = "=0.1.4" }
ephemeral-rollups-sdk-attribute-commit-v2 = { path = "commit-attribute", version = "=0.1.4" }
ephemeral-rollups-sdk-attribute-ephemeral = { path = "ephemeral", version = "=0.2.0" }
ephemeral-rollups-sdk-attribute-delegate = { path = "delegate", version = "=0.2.0" }
ephemeral-rollups-sdk-attribute-commit = { path = "commit-attribute", version = "=0.2.0" }

## External crates
anchor-lang = "0.30.1"
Expand Down
2 changes: 1 addition & 1 deletion rust/commit-attribute/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ephemeral-rollups-sdk-attribute-commit-v2"
name = "ephemeral-rollups-sdk-attribute-commit"
description = "ephemeral-rollups-sdk-attribute-commit"
version = { workspace = true }
authors = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rust/delegate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ephemeral-rollups-sdk-attribute-delegate-v2"
name = "ephemeral-rollups-sdk-attribute-delegate"
description = "ephemeral-rollups-sdk-attribute-delegate"
version = { workspace = true }
authors = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rust/ephemeral/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ephemeral-rollups-sdk-attribute-ephemeral-v2"
name = "ephemeral-rollups-sdk-attribute-ephemeral"
description = "ephemeral-rollups-sdk-attribute-ephemeral"
version = { workspace = true }
authors = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rust/resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rpc = { package = "solana-rpc-client", version = "1.18.26" }
rpc-api = { package = "solana-rpc-client-api", version = "1.18.26" }

# ephemeral rollups
ephemeral-rollups-sdk-v2 = { path = "../sdk" }
ephemeral-rollups-sdk = { path = "../sdk" }


# parsing
Expand Down
2 changes: 1 addition & 1 deletion rust/resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type DelegationsDB = Arc<HashCache<Pubkey, DelegationRecord>>;
/// Conveniece wrapper for results with possible resolver errors
type ResolverResult<T> = Result<T, Error>;

const DELEGATION_PROGRAM_ID: Pubkey = ephemeral_rollups_sdk_v2::id();
const DELEGATION_PROGRAM_ID: Pubkey = ephemeral_rollups_sdk::id();
/// The fixed size of delegation record account's data,
/// NOTE: this value should be updated if the ABI of delegation
/// program changes in the future, that will affect the size
Expand Down
8 changes: 4 additions & 4 deletions rust/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ephemeral-rollups-sdk-v2"
name = "ephemeral-rollups-sdk"
description = "Ephemeral Rollups Integration SDK"
version = { workspace = true }
authors = { workspace = true }
Expand All @@ -18,8 +18,8 @@ anchor = ["anchor-lang"]
[dependencies]
anchor-lang = { workspace = true, optional = true }
borsh = { workspace = true }
ephemeral-rollups-sdk-attribute-delegate-v2 = { workspace = true }
ephemeral-rollups-sdk-attribute-ephemeral-v2 = { workspace = true }
ephemeral-rollups-sdk-attribute-commit-v2 = { workspace = true }
ephemeral-rollups-sdk-attribute-delegate = { workspace = true }
ephemeral-rollups-sdk-attribute-ephemeral = { workspace = true }
ephemeral-rollups-sdk-attribute-commit = { workspace = true }
paste = { workspace = true }
solana-program = { workspace = true }
6 changes: 1 addition & 5 deletions rust/sdk/src/delegate_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use crate::{

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DelegateAccounts {
pub payer: Pubkey,
pub delegated_account: Pubkey,
pub delegate_buffer: Pubkey,
pub delegation_record: Pubkey,
Expand All @@ -22,7 +21,7 @@ pub struct DelegateAccounts {
}

impl DelegateAccounts {
pub fn new(payer: Pubkey, delegated_account: Pubkey, owner_program: Pubkey) -> Self {
pub fn new(delegated_account: Pubkey, owner_program: Pubkey) -> Self {
let delegate_buffer = delegate_buffer_pda_from_delegated_account_and_owner_program(
&delegated_account,
&owner_program,
Expand All @@ -31,7 +30,6 @@ impl DelegateAccounts {
let delegation_metadata =
delegation_metadata_pda_from_delegated_account(&delegated_account);
Self {
payer,
delegated_account,
delegate_buffer,
delegation_record,
Expand All @@ -45,7 +43,6 @@ impl DelegateAccounts {

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DelegateAccountMetas {
pub payer: AccountMeta,
pub delegated_account: AccountMeta,
pub owner_program: AccountMeta,
pub delegate_buffer: AccountMeta,
Expand All @@ -58,7 +55,6 @@ pub struct DelegateAccountMetas {
impl From<DelegateAccounts> for DelegateAccountMetas {
fn from(accounts: DelegateAccounts) -> Self {
Self {
payer: AccountMeta::new(accounts.payer, true),
delegated_account: AccountMeta::new(accounts.delegated_account, false),
owner_program: AccountMeta::new_readonly(accounts.owner_program, false),
delegate_buffer: AccountMeta::new(accounts.delegate_buffer, false),
Expand Down
4 changes: 2 additions & 2 deletions ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magicblock-labs/ephemeral-rollups-sdk-v2",
"version": "0.1.4",
"name": "@magicblock-labs/ephemeral-rollups-sdk",
"version": "0.2.0",
"author": "MagicBlock Labs",
"license": "MIT",
"publishConfig": {
Expand Down

0 comments on commit d54aa11

Please sign in to comment.