From 9b8962d1a1467d0808b75dc705da2b88ea4404f7 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:56:13 -0700 Subject: [PATCH 1/5] Add XDR types for contract meta --- Stellar-contract-meta.x | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Stellar-contract-meta.x diff --git a/Stellar-contract-meta.x b/Stellar-contract-meta.x new file mode 100644 index 0000000..6ee745f --- /dev/null +++ b/Stellar-contract-meta.x @@ -0,0 +1,23 @@ +// Copyright 2022 Stellar Development Foundation and contributors. Licensed +// under the Apache License, Version 2.0. See the COPYING file at the root +// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 + +// The contract spec XDR is highly experimental, incomplete, and still being +// iterated on. Breaking changes expected. + +% #include "xdr/Stellar-types.h" +namespace stellar +{ + +enum SCMetaKind +{ + SC_META_KIND_SDK = 0 +}; + +union SCMetaEntry switch (SCMetaKind kind) +{ +case SC_META_KIND_SDK: + string sdk<256>; +}; + +} From 09336da662b1c8de74946413a86d073d71160715 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:59:13 -0700 Subject: [PATCH 2/5] generic --- Stellar-contract-meta.x | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Stellar-contract-meta.x b/Stellar-contract-meta.x index 6ee745f..dd14e5d 100644 --- a/Stellar-contract-meta.x +++ b/Stellar-contract-meta.x @@ -9,15 +9,21 @@ namespace stellar { +struct SCMetaV0 +{ + string key<10>; + string val<256>; +}; + enum SCMetaKind { - SC_META_KIND_SDK = 0 + SC_META_V0 = 0 }; union SCMetaEntry switch (SCMetaKind kind) { -case SC_META_KIND_SDK: - string sdk<256>; +case SC_META_V0: + SCMetaV0 v0; }; } From a2db6f668ad6d9de97a0bdf485a5821993f29409 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Wed, 19 Apr 2023 09:35:56 -0700 Subject: [PATCH 3/5] Update Stellar-contract-meta.x Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> --- Stellar-contract-meta.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stellar-contract-meta.x b/Stellar-contract-meta.x index dd14e5d..3bef552 100644 --- a/Stellar-contract-meta.x +++ b/Stellar-contract-meta.x @@ -2,7 +2,7 @@ // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 -// The contract spec XDR is highly experimental, incomplete, and still being +// The contract meta XDR is highly experimental, incomplete, and still being // iterated on. Breaking changes expected. % #include "xdr/Stellar-types.h" From 4926deaff39ae11ce643bbf9a3d8373116d38fc4 Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Wed, 19 Apr 2023 10:32:26 -0700 Subject: [PATCH 4/5] Update Stellar-contract-meta.x --- Stellar-contract-meta.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stellar-contract-meta.x b/Stellar-contract-meta.x index 3bef552..65c02b1 100644 --- a/Stellar-contract-meta.x +++ b/Stellar-contract-meta.x @@ -11,7 +11,7 @@ namespace stellar struct SCMetaV0 { - string key<10>; + string key<>; string val<256>; }; From eae41ba80981f2c48b03e6f062f6c7748d93f34f Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Wed, 19 Apr 2023 10:32:42 -0700 Subject: [PATCH 5/5] Update Stellar-contract-meta.x --- Stellar-contract-meta.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stellar-contract-meta.x b/Stellar-contract-meta.x index 65c02b1..16eb5f9 100644 --- a/Stellar-contract-meta.x +++ b/Stellar-contract-meta.x @@ -12,7 +12,7 @@ namespace stellar struct SCMetaV0 { string key<>; - string val<256>; + string val<>; }; enum SCMetaKind