WalletConnect 2.0 and Unreal Engine 5: Hello World Example
This is a straightforward blueprint example that demonstrates how to send transactions using WalletConnect 2.0 in Unreal Engine 5.
Last updated
This is a straightforward blueprint example that demonstrates how to send transactions using WalletConnect 2.0 in Unreal Engine 5.
Last updated
Prepare DeFi wallet or MetaMask.
chainid: 338
currency symbol: tcro
explorer: https://explorer.cronos.org/testnet/
Open the "ThirdPerson/Code/MyWallet" file and navigate to the "Setup" function
ProjectID:
Visit WalletConnect Cloud.
Go to the Projects section.
Click on Create to generate a new project ID.
From Address:
Enter the signing address (the address from which the transaction will be signed).
To Address:
Enter the receiver address (the address to which the transaction will be sent).
Run the project.
You can sign transactions using a DeFi wallet or MetaMask.
Initialize
Prepare the session to connect.
Initialize WalletConnect 2.0 in the game.
Sample values
relay server: wss://relay.walletconnect.com
walletnamespace: {"eip155":{"methods":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],"chains":["eip155:338"],"events":["chainChanged","accountsChanged"]}}
clientmeta: {"description":"Defi WalletConnect v2 example.","url":"http://localhost:8080/","icons":[],"name":"Defi WalletConnect Web3 Example"}
ShowQR
Update the texture by rendering the QR code image onto it
EnsureSession
Connect to the WalletConnect session and wait until the user approves the connection.
To connect using WalletConnect 2.0, open your DeFi wallet or MetaMask and scan the QR code.
SendTX
Once the WalletConnect session is established, the SendTX screen appears in the user's wallet.
If the user approves, the transaction is signed and broadcast.
Sample Values
gas: 1100000
gas price: 10646859727182
value: 190012345678912
data: none
nonce: none