Documentation Index
Fetch the complete documentation index at: https://docs.sequence.xyz/llms.txt
Use this file to discover all available pages before exploring further.
🛠️ ステップ 1:Sequence の Unity SDK をインストールする
SDKのGitHubリリースからv5をダウンロードし、Ecosystem Walletsにアクセスしましょう。.unitypackage ファイルとしてダウンロードし、Unityプロジェクトに追加してください。
Ecosystem Walletsの動作を確認したい場合は、組み込みデモをお試しください。
🔑 ステップ2:Unityプロジェクトの設定
sequence.buildにアクセスし、サインアップまたはログインして新しいプロジェクトを作成します。Builder Getting Startedガイドで手順を確認できます。
Unityセットアップガイドに従って、Unity SDKの設定を行いましょう。
💼 ステップ3:権限付きセッションの作成
特定のコントラクトにトランザクションを送信するには、必要な権限を持つセッションを最初に作成する必要があります。
Chain chain = Chain.TestnetAbitrumSepolia;
Address contractAddress = new Address("0x33985d320809E26274a72E03268c8a29927Bc6dA");
BigInteger deadline = new BigInteger(DateTimeOffset.UtcNow.ToUnixTimeSeconds() * 1000 + 1000 * 60 * 5000);
BigInteger valueLimit = 0;
IPermissions permissions = new ContractPermissions(chain, contractAddress, deadline, valueLimit);
次に、これらの権限を持つSequenceConnectインターフェースを作成し、ウォレットセッションを開始します。
その他のログインオプションはこちらをご覧ください。
SequenceConnect connect = new SequenceConnect();
IWallet wallet = await connect.SignInWithGoogle(permissions);
📨 ステップ4:トランザクションを送信する
最後に、作成したウォレットセッションを使って、権限で指定したコントラクトアドレスへトランザクションを送信しましょう。
Chain chain = Chain.TestnetAbitrumSepolia;
Address to = new Address("0x33985d320809E26274a72E03268c8a29927Bc6dA");
ITransaction[] transactions = new Transaction[]
{
new Transaction(to, 0, "explicitEmit()")
};
string txnHash = await wallet.SendTransaction(chain, transactions);