From fd21ffee3398287fc94483dabaf0f3c5f1e718ed Mon Sep 17 00:00:00 2001 From: Jack Wang <53543329+jwang35412@users.noreply.github.com> Date: Wed, 31 Jul 2019 16:25:06 -0700 Subject: [PATCH 1/3] Create OEP-59.mediawiki --- OEPS/OEP-59.mediawiki | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 OEPS/OEP-59.mediawiki diff --git a/OEPS/OEP-59.mediawiki b/OEPS/OEP-59.mediawiki new file mode 100644 index 0000000..7c2297d --- /dev/null +++ b/OEPS/OEP-59.mediawiki @@ -0,0 +1,46 @@ +
+ OEP: 59 + Title: Composite Smart Contract Standard + Author: Jack Wang+ +==Abstract== + +Given the existence of an abundance of OEP standards, a method for detection should be implemented. + +This OEP proposes a solution to the scenarios where a smart contract supports multiple existing standards. + +The OEP is a specification for creating a smart contract which conforms with two or more other OEPs. + +==Motivation== + +A standard interface which allows the detection of implemented standards on the Ontology blockchain to be conveniently used by other applications. + +==Specification== + +===Methods=== + +====supportedStandards==== + ++ Type: Standard + Status: Accepted + Created: 2019-07-31 +
+def supportedStandards() ++ +Returns an array of
string values in the format "OEP-X" where X corresponds to an existing OEP standard.
+
+For example, an OEP-4 contract implementing this standard would return ["OEP-4", "OEP-59"].
+
+====supports====
+
++def supports(standard) ++ +Returns a
boolean whether the contract supports the standard.
+
+For example, supports("OEP-4") would return true if supportedStandards() returns ["OEP-4", "OEP-59"].
+
+===Implementation===
From 747366746bfb2ca55a9463a94dd9d128606544d7 Mon Sep 17 00:00:00 2001
From: Jack Wang <53543329+jwang35412@users.noreply.github.com>
Date: Wed, 31 Jul 2019 16:33:27 -0700
Subject: [PATCH 2/3] python example
---
OEPS/OEP-59.mediawiki | 2 ++
1 file changed, 2 insertions(+)
diff --git a/OEPS/OEP-59.mediawiki b/OEPS/OEP-59.mediawiki
index 7c2297d..b60ef6e 100644
--- a/OEPS/OEP-59.mediawiki
+++ b/OEPS/OEP-59.mediawiki
@@ -44,3 +44,5 @@ Returns a boolean whether the contract supports the standard<
For example, supports("OEP-4") would return true if supportedStandards() returns ["OEP-4", "OEP-59"].
===Implementation===
+
+OEP-4/59: [[https://github.com/jwang35412/OEP4-Example/blob/master/contract.py | python example]]
From 63744bdb9d923468ebdbf70a47e48d1182bb8847 Mon Sep 17 00:00:00 2001
From: Jawax <53543329+jwang35412@users.noreply.github.com>
Date: Sat, 3 Aug 2019 16:38:37 -0700
Subject: [PATCH 3/3] fix name
---
OEPS/OEP-59.mediawiki | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OEPS/OEP-59.mediawiki b/OEPS/OEP-59.mediawiki
index b60ef6e..c55f83d 100644
--- a/OEPS/OEP-59.mediawiki
+++ b/OEPS/OEP-59.mediawiki
@@ -1,7 +1,7 @@
OEP: 59
Title: Composite Smart Contract Standard
- Author: Jack Wang
+ Author: Jawax
Type: Standard
Status: Accepted
Created: 2019-07-31