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 React, { useState, useEffect, useCallback } from "react"; | |
import { useWeb3Network } from "@openzeppelin/network"; | |
const PROVIDER_URL = "http://127.0.0.1:8545"; | |
function App() { | |
// get GSN web3 | |
const context = useWeb3Network(PROVIDER_URL, { | |
gsn: { dev: true } | |
}); |
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.5.0; | |
import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol"; | |
contract Counter is GSNRecipient { | |
uint256 public value; | |
function increase() public { | |
value += 1; | |
} |
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.5.0; | |
import "@openzeppelin/upgrades/contracts/Initializable.sol"; | |
import "./GSNBouncerBase.sol"; | |
import "../../cryptography/ECDSA.sol"; | |
contract GSNBouncerSignature is Initializable, GSNBouncerBase { | |
using ECDSA for bytes32; | |
// We use a random storage slot to allow proxy contracts to enable GSN support in an upgrade without changing their |
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
require("dotenv").config(); | |
const port = process.env.PORT || 3000; | |
const express = require("express"); | |
const asyncHandler = require("express-async-handler"); | |
const app = express(); | |
const { signMessage } = require("./utils/signUtils.js"); | |
const { | |
getDatabase, | |
addUser, | |
deleteUser, |
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
{ | |
"activeTab": { | |
"title": "How To Get Logs And Help MetaMask Support and Diagnose Your Issue – MetaMask", | |
"origin": "metamask.zendesk.com", | |
"protocol": "https:", | |
"url": "https://metamask.zendesk.com/hc/en-us/articles/360015290092-How-To-Get-Logs-And-Help-MetaMask-Support-and-Diagnose-Your-Issue" | |
}, | |
"metamask": { | |
"isInitialized": true, | |
"isUnlocked": true, |
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
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box. | |
✅ did:muport:QmPAW4V6FfY9UfXQbuysa4Vyov7ioutnKtKvzBjuTYNH7B ✅ | |
Create your profile today to start building social connection and trust online at https://3Box.io/ |
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
<!------------------------ Custom Contract: Public Method: important ------------------------ | |
This method takes no arguments and should return a value. The user should be able to choose | |
to auto-invote this value on page-load or by using a button manually | |
--> | |
<!--Auto-Invoke--> | |
<div id="dh" data-dh-feature="customContract" data-dh-property-contract-name="DappHeroTest" | |
data-dh-property-method-name="important"> | |
Placeholder Value to be Replaced | |
</div> |
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
<!------------------------ Custom Contract: Public Method: viewNoArgsMultipleReturn ------------------------ | |
This method takes no arguments and should return multiple values. The user should be able to choose | |
to auto-invoke this value on page-load or by using a button manually. | |
Note: users are not required to use all returned arguments. | |
--> | |
<!--Implicit-Auto-Invoke--> | |
<div id="dh" data-dh-feature="customContract" data-dh-property-contract-name="DappHeroTest" | |
data-dh-property-method-name="viewNoArgsMultipleReturn" data-dh-id="someUniqueId-2"> | |
</div> |
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
<!------------------------ Custom Contract: Public Method: viewMultipleArgsMultipleReturn ------------------------ | |
This method takes any number of input arguments and should return multiple values. All input arguments are required. | |
Note: users are not required to use all returned arguments. | |
--> | |
<!--Implicit-Auto-Invoke--> | |
<div id="dh" data-dh-feature="customContract" data-dh-property-contract-name="DappHeroTest" | |
data-dh-property-method-name="viewMultipleArgsMultipleReturn" data-dh-id="someUniqueId-4"> | |
</div> |
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
<!------------------------ Custom Contract: Transaction: send Eth with no ARgs ------------------------ | |
This method takes no arguments but sends a transaction to a contract and allows the user to send ETH with the | |
transaction to the contract method. (Methods with no arguments do exist) | |
Sending transactions should not Auto-Invoke. | |
--> | |
<!-- Value for Ether Amount from a form input --> | |
<div id="dh" data-dh-feature="customContract" data-dh-property-contract-name="DappHeroTest" | |
data-dh-property-method-name="sendEthNoArgs" data-dh-id="someUniqueId-7"></div> |