Skip to content

Commit

Permalink
Merge branch 'FI-1339-icrc-21-markdown-refinement' into 'master'
Browse files Browse the repository at this point in the history
chore(ICRC21): FI-1339: Icrc 21 markdown refinement

This MR introduces the following changes:
1. Formatting of Nat to use ' instead of _
2. Formatting of the expires at timestamp 
3. Change the consent message base
4. Formatting of the transmitted Memo to account for potential strings converted to byte arrays.
5. Add offset option
6. Remove fee set and created at timestamp 

See merge request dfinity-lab/public/ic!20188
  • Loading branch information
NikolasHai committed Jul 5, 2024
2 parents 6101d93 + e219f99 commit f7534e8
Show file tree
Hide file tree
Showing 8 changed files with 582 additions and 513 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions packages/icrc-ledger-types/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rust_library(
"@crate_index//:serde_bytes",
"@crate_index//:sha2",
"@crate_index//:strum",
"@crate_index//:time",
],
)

Expand Down
4 changes: 3 additions & 1 deletion packages/icrc-ledger-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ serde = { workspace = true }
sha2 = "0.10"
itertools ={ workspace = true }
strum = {workspace = true}
time = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
hex = { workspace = true }
proptest = "1.0.0"
proptest = "1.0.0"
441 changes: 264 additions & 177 deletions packages/icrc-ledger-types/src/icrc21/lib.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/icrc-ledger-types/src/icrc21/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use serde::Serialize;
#[derive(Debug, CandidType, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct ConsentMessageMetadata {
pub language: String,
pub utc_offset_minutes: Option<i16>,
}

#[derive(Debug, CandidType, Clone, Serialize, Deserialize, PartialEq, Eq)]
Expand Down
1 change: 1 addition & 0 deletions rs/rosetta-api/icp_ledger/ledger.did
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ type TransferFromError = variant {

type icrc21_consent_message_metadata = record {
language: text;
utc_offset_minutes: opt int16;
};

type icrc21_consent_message_spec = record {
Expand Down
1 change: 1 addition & 0 deletions rs/rosetta-api/icrc1/ledger/ledger.did
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ type ICRC3DataCertificate = record {

type icrc21_consent_message_metadata = record {
language: text;
utc_offset_minutes: opt int16;
};

type icrc21_consent_message_spec = record {
Expand Down
Loading

0 comments on commit f7534e8

Please sign in to comment.