diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6ff40eb8..d34b266f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.2.2-beta02
+
+- Fix on requestReadContract. Fixes issues https://github.com/WalletConnect/WalletConnectFlutterV2/issues/278 and https://github.com/WalletConnect/Web3ModalFlutter/issues/99
+
## 2.2.2-beta01
- Updated dependencies
diff --git a/example/dapp/ios/Flutter/AppFrameworkInfo.plist b/example/dapp/ios/Flutter/AppFrameworkInfo.plist
index 9625e105..7c569640 100644
--- a/example/dapp/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/dapp/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/example/dapp/ios/Podfile b/example/dapp/ios/Podfile
index 88359b22..279576f3 100644
--- a/example/dapp/ios/Podfile
+++ b/example/dapp/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '11.0'
+# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/example/dapp/ios/Podfile.lock b/example/dapp/ios/Podfile.lock
index f96654a8..10a127e7 100644
--- a/example/dapp/ios/Podfile.lock
+++ b/example/dapp/ios/Podfile.lock
@@ -30,6 +30,6 @@ SPEC CHECKSUMS:
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
-PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
+PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011
COCOAPODS: 1.13.0
diff --git a/example/dapp/ios/Runner.xcodeproj/project.pbxproj b/example/dapp/ios/Runner.xcodeproj/project.pbxproj
index 820303a0..567e4af4 100644
--- a/example/dapp/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/dapp/ios/Runner.xcodeproj/project.pbxproj
@@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1430;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -342,7 +342,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -421,7 +421,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -470,7 +470,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/example/dapp/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/dapp/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a6b826db..5e31d3d3 100644
--- a/example/dapp/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/dapp/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
diff --git a/lib/apis/sign_api/i_sign_engine_app.dart b/lib/apis/sign_api/i_sign_engine_app.dart
index a0764a0d..df93ba67 100644
--- a/lib/apis/sign_api/i_sign_engine_app.dart
+++ b/lib/apis/sign_api/i_sign_engine_app.dart
@@ -19,7 +19,7 @@ abstract class ISignEngineApp extends ISignEngineCommon {
required String chainId,
required SessionRequestParams request,
});
- Future requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
diff --git a/lib/apis/sign_api/sign_client.dart b/lib/apis/sign_api/sign_client.dart
index 7b75f063..1f992099 100644
--- a/lib/apis/sign_api/sign_client.dart
+++ b/lib/apis/sign_api/sign_client.dart
@@ -264,7 +264,7 @@ class SignClient implements ISignClient {
}
@override
- Future requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart
index 49085640..e0acba34 100644
--- a/lib/apis/sign_api/sign_engine.dart
+++ b/lib/apis/sign_api/sign_engine.dart
@@ -471,7 +471,7 @@ class SignEngine implements ISignEngine {
}
@override
- Future requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
@@ -479,15 +479,14 @@ class SignEngine implements ISignEngine {
}) async {
try {
core.logger.i('readContractCall: with function $functionName');
- final result = await Web3Client(rpcUrl, http.Client()).call(
+ final results = await Web3Client(rpcUrl, http.Client()).call(
contract: deployedContract,
function: deployedContract.function(functionName),
params: parameters,
);
- core.logger.i(
- 'readContractCall - function: $functionName - result: ${result.first}');
- return result.first;
+ core.logger.i('readContractCall: $functionName - results: $results');
+ return results;
} catch (e) {
rethrow;
}
diff --git a/lib/apis/web3app/web3app.dart b/lib/apis/web3app/web3app.dart
index 11f1167c..5252c7ac 100644
--- a/lib/apis/web3app/web3app.dart
+++ b/lib/apis/web3app/web3app.dart
@@ -211,7 +211,7 @@ class Web3App implements IWeb3App {
}
@override
- Future requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
diff --git a/lib/src/version.dart b/lib/src/version.dart
index dd3f282e..b5c8717d 100644
--- a/lib/src/version.dart
+++ b/lib/src/version.dart
@@ -1,2 +1,2 @@
// Generated code. Do not modify.
-const packageVersion = '2.2.2-beta01';
+const packageVersion = '2.2.2-beta02';
diff --git a/pubspec.yaml b/pubspec.yaml
index ec6af03c..3dc5c7f5 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: walletconnect_flutter_v2
description: This repository contains oficial implementation of WalletConnect v2 protocols for Flutter applications. The communications protocol for web3.
-version: 2.2.2-beta01
+version: 2.2.2-beta02
repository: https://github.com/WalletConnect/WalletConnectFlutterV2
environment:
diff --git a/test/sign_api/utils/sign_client_test_wrapper.dart b/test/sign_api/utils/sign_client_test_wrapper.dart
index bf6d76f2..b7ec648b 100644
--- a/test/sign_api/utils/sign_client_test_wrapper.dart
+++ b/test/sign_api/utils/sign_client_test_wrapper.dart
@@ -218,7 +218,7 @@ class SignClientTestWrapper implements ISignEngine {
}
@override
- Future requestReadContract({
+ Future> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,