Skip to content

Commit

Permalink
feat: update index file and simplify zk send transaction request model
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Oct 4, 2023
1 parent 7531833 commit 2c6f8e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 38 deletions.
2 changes: 0 additions & 2 deletions sample/Assets/Scripts/AuthenticatedScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,9 @@ public async void SendZkTransaction()
try
{
ShowOutput($"Called sendTransaction()...");
List<string> accounts = await passport.ZkEvmRequestAccounts();
string? response = await passport.ZkEvmSendTransaction(new TransactionRequest()
{
To = zkSendTransactionTo.text,
From = accounts[0],
Value = zkSendTransactionAmount.text,
Data = zkSendTransactionFunctionSignature.text

Expand Down
2 changes: 1 addition & 1 deletion src/Packages/Passport/Editor/PassportPostprocess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void OnPostprocessBuild(BuildReport report)
var method = type.GetMethod("AddFrameworkToProject");
method.Invoke(proj, new object[] { target, "AuthenticationServices.framework", false });
}

var cflags = "";
if (EditorUserBuildSettings.development)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Packages/Passport/Runtime/Resources/index.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 2c6f8e2

Please sign in to comment.