Unity + MetaMask (WebGL)
BlockChain,NFT,Web3.0 2022. 1. 6. 14:36메타마스크 가입
https://github.com/ChainSafe/web3.unity
https://medium.com/coinmonks/unity-engine-metamask-wallet-6797d4699e45
https://youtu.be/j5YF6gqzREc?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5
https://youtu.be/DSjOJJ9oFIQ?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5
https://github.com/ChainSafe/web3.unity
패키지 임포트
http://wiki.hash.kr/index.php/ERC-1155
https://chainsafe.github.io/game-docs/
https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721-balanceOf-address
using System.Collections;
using System.Numerics;
using System.Collections.Generic;
using UnityEngine;
public class ERC1155BalanceOfExample : MonoBehaviour
{
public GameObject sphere;
async void Start()
{
string chain = "ethereum";
string network = "rinkeby";
string contract = "0x88B48F654c30e99bc2e4A1559b4Dcf1aD93FA656";
string account = "0xc5515290f762ba8E9310D04890Ca07ddBFf99DB3";
string tokenId = "98615320484598992040676402456642409609199392447938652495052258767049420963841";
BigInteger balanceOf = await ERC1155.BalanceOf(chain, network, contract, account, tokenId);
print(balanceOf);
if (balanceOf >= 0) {
sphere.GetComponent<Renderer>().material.SetColor("_Color", Color.red);
}
}
}
https://app.mycrypto.com/faucet
https://app.mycrypto.com/faucet
재접속
https://en.wikipedia.org/wiki/MetaMask
https://medium.com/coinmonks/unity-engine-metamask-wallet-6797d4699e4
https://chainsafe.github.io/game-docs/
https://testnets.opensea.io/asset/create
https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721-balanceOf-address-
https://app.mycrypto.com/add-account
https://youtu.be/3zCSuTl0Ads?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5
https://www.youtube.com/watch?v=7D-pja1Dmkg&list=PLPn3rQCo3XrP-n_6tVVjCVRwiBjnzkj1T
'BlockChain,NFT,Web3.0' 카테고리의 다른 글
17 ~ 18. SmartContracts, The Solidity Programming Language (0) | 2022.01.20 |
---|---|
Unity + Metamask (Android) (2) | 2022.01.06 |
Block Header의 6가지 정보 (0) | 2021.12.19 |
Step 04. javascript로 블록 체인 만들기_블록 만들기 (0) | 2021.12.17 |
Step 03. javascript로 블록 체인 만들기_생성자 함수 (0) | 2021.12.17 |