This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Nethereum.Signer; | |
| using Nethereum.Signer.EIP712; | |
| using Nethereum.Web3.Accounts; | |
| using System; | |
| using System.Collections.Generic; | |
| namespace EIP712Signature | |
| { | |
| class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using MetaMask.Models; | |
| using Nethereum.Hex.HexTypes; | |
| using UnityEngine; | |
| using Web3Unity.Scripts.Library.Ethers.Contracts; | |
| using Web3Unity.Scripts.Library.Ethers.Providers; | |
| using Web3Unity.Scripts.Library.Ethers.Signers; | |
| using Web3Unity.Scripts.Library.Ethers.Transactions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| contract JsonPlayerObject { | |
| struct Player { | |
| string listedNftId; | |
| string nameId; | |
| string speed; | |
| string weaponSlots; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Networking; | |
| public class CeloGetNFTScript : MonoBehaviour | |
| { | |
| /// <summary> | |
| /// { | |
| ///description: "Pack of 3", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class Web3PrivateKeySignVerify : MonoBehaviour | |
| { | |
| void Start() | |
| { | |
| string privateKey = "You PK"; | |
| string message = "hello"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Numerics; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class BalanceOfBatchMainNet : MonoBehaviour | |
| { | |
| public string chain = "ethereum"; | |
| public string network = "mainnet"; // mainnet rinkeby ropsten | |
| public string contract = "0x495f947276749ce646f68ac8c248420045cb7b5e"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using System.Numerics; | |
| public class ToWei : MonoBehaviour | |
| { | |
| decimal dec = 0.25m; | |
| // Start is called before the first frame update | |
| void Start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Indentifier: MIT | |
| pragma solidity ^0.8.7; | |
| import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| contract DistributeCoins { | |
| address public owner; | |
| uint256 public balance; | |
| event TransferRecieved(address _from, uint _amount); | |
| event TransferSent(address _from,address _destAddr, uint _amount); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static string GetRefinedBalance(string balance, int desiredDecimals) | |
| { | |
| if (desiredDecimals < 0) desiredDecimals = 0; | |
| else if (desiredDecimals > 18) desiredDecimals = 18; | |
| int whole = balance.Length - 18, | |
| decimals = balance.Length - whole, | |
| stringLength = whole + (decimals - (18 - desiredDecimals)); | |
| string newBalance = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.3; | |
| /* Signature Verification | |
| How to Sign and Verify | |
| # Signing | |
| 1. Create message to sign | |
| 2. Hash the message |
NewerOlder