From d1fe958ae1ae171d5477b51fa575487ff315c19c Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Wed, 4 Oct 2023 17:35:30 +1300 Subject: [PATCH] feat: update index file and simplify zk send transaction request model --- sample/Assets/Scripts/AuthenticatedScript.cs | 2 -- .../Passport/Runtime/Resources/index.html | 8 ++--- .../Model/Request/TransactionRequest.cs | 32 +------------------ 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/sample/Assets/Scripts/AuthenticatedScript.cs b/sample/Assets/Scripts/AuthenticatedScript.cs index 5b5d2cb7..1c8eb158 100644 --- a/sample/Assets/Scripts/AuthenticatedScript.cs +++ b/sample/Assets/Scripts/AuthenticatedScript.cs @@ -224,11 +224,9 @@ public async void SendZkTransaction() try { ShowOutput($"Called sendTransaction()..."); - List accounts = await passport.ZkEvmRequestAccounts(); string? response = await passport.ZkEvmSendTransaction(new TransactionRequest() { To = zkSendTransactionTo.text, - From = accounts[0], Value = zkSendTransactionAmount.text, Data = zkSendTransactionFunctionSignature.text diff --git a/src/Packages/Passport/Runtime/Resources/index.html b/src/Packages/Passport/Runtime/Resources/index.html index 5acdfe3b..458ab193 100644 --- a/src/Packages/Passport/Runtime/Resources/index.html +++ b/src/Packages/Passport/Runtime/Resources/index.html @@ -1,4 +1,4 @@ -GameSDK Bridge

Bridge Running

\ No newline at end of file diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/TransactionRequest.cs b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/TransactionRequest.cs index 021e6f11..6686be08 100644 --- a/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/TransactionRequest.cs +++ b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/TransactionRequest.cs @@ -6,38 +6,8 @@ namespace Immutable.Passport.Model [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] public class TransactionRequest { - public string? To; - public string? From; - public string? Nonce; - - public string? GasLimit; - public string? GasPrice; - + public string To; public string? Data; public string? Value; - public int? ChainId; - - public int? Type; - public AccessListItem[]? AccessList; - - public string? MaxPriorityFeePerGas; - public string? MaxFeePerGas; - - public CustomData[]? CustomData; - public bool? CcipReadEnabled; - } - - [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] - public class AccessListItem - { - public string Address; - public string[] StorageKeys; - } - - [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] - public class CustomData - { - public string Key; - public object Value; } } \ No newline at end of file