55import com .kryptokrauts .aeternity .sdk .service .compiler .domain .ACIResult ;
66import io .reactivex .Single ;
77import java .util .List ;
8+ import java .util .Map ;
89
910public interface CompilerService {
1011
@@ -14,28 +15,59 @@ public interface CompilerService {
1415 * @param contractCode the sourcecode of the contract
1516 * @param function the name of the function to call
1617 * @param arguments the params that should be passed to the function
17- * @return asynchronous result handler (RxJava Single) for encoded calldata
18+ * @return asynchronous result handler (RxJava Single) for encoded calldata * @deprecated use
19+ * {@link asyncEncodeCalldata(String contractCode, String function, List<String> arguments,
20+ * Map<String, String> fileSystem)} instead. this method will be removed in future releases
1821 */
22+ @ Deprecated
1923 Single <StringResultWrapper > asyncEncodeCalldata (
2024 String contractCode , String function , List <String > arguments );
2125
26+ /**
27+ * asynchronously gets the encoded calldata for this contractCode
28+ *
29+ * @param contractCode the sourcecode of the contract
30+ * @param function the name of the function to call
31+ * @param arguments the params that should be passed to the function
32+ * @param fileSystem map with libraryName and code which is passed to the compiler
33+ * @return asynchronous result handler (RxJava Single) for encoded calldata
34+ */
35+ Single <StringResultWrapper > asyncEncodeCalldata (
36+ String contractCode , String function , List <String > arguments , Map <String , String > fileSystem );
37+
2238 /**
2339 * synchronously gets the encoded calldata for this contractCode
2440 *
2541 * @param contractCode the sourcecode of the contract
2642 * @param function the name of the function to call
2743 * @param arguments the params that should be passed to the function
2844 * @return encoded calldata
45+ * @deprecated use {@link blockingEncodeCalldata(String contractCode, String function,
46+ * List<String> arguments, Map<String, String> fileSystem)} instead. this method will be
47+ * removed in future releases
2948 */
49+ @ Deprecated
3050 StringResultWrapper blockingEncodeCalldata (
3151 String contractCode , String function , List <String > arguments );
3252
53+ /**
54+ * synchronously gets the encoded calldata for this contractCode
55+ *
56+ * @param contractCode the sourcecode of the contract
57+ * @param function the name of the function to call
58+ * @param arguments the params that should be passed to the function
59+ * @param fileSystem map with libraryName and code which is passed to the compiler
60+ * @return encoded calldata
61+ */
62+ StringResultWrapper blockingEncodeCalldata (
63+ String contractCode , String function , List <String > arguments , Map <String , String > fileSystem );
64+
3365 /**
3466 * asynchronously gets the contract bytecode for this contractCode
3567 *
3668 * @param contractCode the sourcecode of the contract
3769 * @param srcFile untested compileOpts value: set null
38- * @param fileSystem untested compileOpts value: set null
70+ * @param fileSystem map with libraryName and code which is passed to the compiler
3971 * @return asynchronous result handler (RxJava Single) for byteCode of the compiled contract
4072 */
4173 Single <StringResultWrapper > asyncCompile (String contractCode , String srcFile , Object fileSystem );
@@ -45,7 +77,7 @@ StringResultWrapper blockingEncodeCalldata(
4577 *
4678 * @param contractCode the sourcecode of the contract
4779 * @param srcFile untested compileOpts value: set null
48- * @param fileSystem untested compileOpts value: set null
80+ * @param fileSystem map with libraryName and code which is passed to the compiler
4981 * @return byteCode of the compiled contract
5082 */
5183 StringResultWrapper blockingCompile (String contractCode , String srcFile , Object fileSystem );
@@ -76,10 +108,31 @@ StringResultWrapper blockingEncodeCalldata(
76108 * @param callResult the received resultType (ok | error | revert)
77109 * @param callValue the received value
78110 * @return the decoded sophia call result
111+ * @deprecated use {@link asyncDecodeCallResult(String source, String function, String callResult,
112+ * String callValue, Map<String, String> fileSystem)} instead. this method will be removed in
113+ * future releases
79114 */
115+ @ Deprecated
80116 Single <ObjectResultWrapper > asyncDecodeCallResult (
81117 String source , String function , String callResult , String callValue );
82118
119+ /**
120+ * asynchronously decodes callresult of contract-calls
121+ *
122+ * @param source the contract source
123+ * @param function the called function
124+ * @param callResult the received resultType (ok | error | revert)
125+ * @param callValue the received value
126+ * @param fileSystem map with libraryName and code which is passed to the compiler
127+ * @return the decoded sophia call result
128+ */
129+ Single <ObjectResultWrapper > asyncDecodeCallResult (
130+ String source ,
131+ String function ,
132+ String callResult ,
133+ String callValue ,
134+ Map <String , String > fileSystem );
135+
83136 /**
84137 * synchronously decodes callresult of contract-calls
85138 *
@@ -88,17 +141,38 @@ Single<ObjectResultWrapper> asyncDecodeCallResult(
88141 * @param callResult the received resultType (ok | error | revert)
89142 * @param callValue the received value
90143 * @return the decoded sophia call result
144+ * @deprecated use {@link blockingDecodeCallResult(String source, String function, String
145+ * callResult, String callValue, Map<String, String> fileSystem)} instead. this method will be
146+ * removed in future releases
91147 */
148+ @ Deprecated
92149 ObjectResultWrapper blockingDecodeCallResult (
93150 String source , String function , String callResult , String callValue );
94151
152+ /**
153+ * synchronously decodes callresult of contract-calls
154+ *
155+ * @param source the contract source
156+ * @param function the called function
157+ * @param callResult the received resultType (ok | error | revert)
158+ * @param callValue the received value
159+ * @param fileSystem map with libraryName and code which is passed to the compiler
160+ * @return the decoded sophia call result
161+ */
162+ ObjectResultWrapper blockingDecodeCallResult (
163+ String source ,
164+ String function ,
165+ String callResult ,
166+ String callValue ,
167+ Map <String , String > fileSystem );
168+
95169 /**
96170 * asynchronously generates the ACI for this contractCode
97171 * https://github.com/aeternity/aesophia/blob/master/docs/aeso_aci.md
98172 *
99173 * @param contractCode the sourcecode of the contract
100174 * @param srcFile untested compileOpts value: set null
101- * @param fileSystem untested compileOpts value: set null
175+ * @param fileSystem map with libraryName and code which is passed to the compiler
102176 * @return asynchronous result handler (RxJava Single) for {@link ACIResult}
103177 */
104178 Single <ACIResult > asyncGenerateACI (String contractCode , String srcFile , Object fileSystem );
@@ -109,7 +183,7 @@ ObjectResultWrapper blockingDecodeCallResult(
109183 *
110184 * @param contractCode the sourcecode of the contract
111185 * @param srcFile untested compileOpts value: set null
112- * @param fileSystem untested compileOpts value: set null
186+ * @param fileSystem map with libraryName and code which is passed to the compiler
113187 * @return result of {@link ACIResult}
114188 */
115189 ACIResult blockingGenerateACI (String contractCode , String srcFile , Object fileSystem );
0 commit comments