diff --git a/packages/templates/app/ios/Template/PolywrapDemo.swift b/packages/templates/app/ios/Template/PolywrapDemo.swift index 968a652ae..f50411751 100644 --- a/packages/templates/app/ios/Template/PolywrapDemo.swift +++ b/packages/templates/app/ios/Template/PolywrapDemo.swift @@ -2,26 +2,15 @@ import UIKit import PolywrapClient func polywrapDemo() { - print("Invoking: Logging.info(...)") + print("Invoking: Sha3.sha3_256(...)") - let logger = Logging() - let logArgs = LoggingArgsLog(level: .INFO, message: "Hello there") - try? logger.log(args: logArgs) - - // Ethers.encodeParams - print("Invoking: Ethers.encodeParams(...)") - - let eth = Ethers() - let encodeArgs = EthersArgsEncodeParams( - types: ["address", "uint256"], - values: ["0xB1B7586656116D546033e3bAFF69BFcD6592225E", "500"] - ) - do { - let encoded = try eth.encodeParams(args: encodeArgs) - print("Ethers.encodeParams:\n\(encoded)") + let sha3 = Sha3() + let sha3_256Args = Sha3ArgsSha3256(message: "Hello Polywrap!") + + do{ + let result = try sha3.sha3_256(args: sha3_256Args) + print("Sha3.sha3_256: \(result)") } catch { - let logArgs = LoggingArgsLog(level: .ERROR, message: "Error - Ethers.encodeParams: \(error)") - try? logger.log(args: logArgs) - return + print("Error - Sha3.sha3_256: \(error)") } -} \ No newline at end of file +} diff --git a/packages/templates/app/ios/polywrap.graphql b/packages/templates/app/ios/polywrap.graphql index 153ac9578..2abd29479 100644 --- a/packages/templates/app/ios/polywrap.graphql +++ b/packages/templates/app/ios/polywrap.graphql @@ -1,2 +1 @@ -#import * into Logging from "wrapscan.io/polywrap/logger@1.0" -#import * into Ethers from "wrapscan.io/polywrap/ethers@1.1" +#import * into Sha3 from "wrapscan.io/polywrap/sha3@1" diff --git a/packages/templates/app/ios/polywrap.yaml b/packages/templates/app/ios/polywrap.yaml index 3f2c77798..4d6d87535 100644 --- a/packages/templates/app/ios/polywrap.yaml +++ b/packages/templates/app/ios/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.4.0 +format: 0.5.0 project: name: Sample type: app/swift