This file contains 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
type UTXO = { | |
id: string; | |
amount: number; | |
}; | |
type Wallet = { | |
address: string; | |
utxos: UTXO[]; | |
}; | |
This file contains 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
pragma solidity ^0.7.6; | |
pragma abicoder v2; | |
import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol"; | |
contract Authentication { | |
using ECDSA for bytes32; | |
string public constant name = "EIP712Authentication"; | |
string public constant version = "1.0.0"; |
This file contains 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
import { ethers, verifyTypedData, JsonRpcProvider, Wallet, TypedDataField } from "ethers"; | |
interface IProviderAndSigner { | |
provider: JsonRpcProvider; | |
signer: Wallet; | |
} | |
interface IDomain { | |
name: string, | |
version: string, |
This file contains 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.18; | |
contract UserContractFactory { | |
mapping(address => address) public userContracts; | |
address public storageContractAddr; | |
address public owner; | |
bytes constant GET_NUMBER_SIG = abi.encodeWithSelector(bytes4(keccak256("getNumber()"))); |