type Customer {
id: ID!
email: 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
import { useState, useEffect } from 'react' | |
import Web3 from 'web3' | |
const [account, setAccount] = useState(null) | |
let [web3, setWeb3] = useState(null) | |
useEffect(() => { | |
checkAccount() | |
}, []) | |
// invoke to connect to wallet account |
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
/** | |
* Smart contract enabling funding and exchanging of DevCoin. | |
* The rate is defined by the owner of the contract, but it will never be less than ICO price. | |
* The price of token in ETH is 1/rate. Eg for 1 Eth the sender will get rate number of tokens. | |
*/ | |
contract Exchange { | |
using SafeMath for uint256; | |
address public owner; | |
uint public creationTime = now; |
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 from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import ReactPlayer from 'react-player' | |
import { HashRouter, Link, Switch, Route } from 'react-router-dom' | |
import AuthComponent from './AuthComponent' | |
import { Auth, API } from 'aws-amplify' | |
import { createComment as CreateComment } from './graphql/mutations' | |
import { listComments as ListComments } from './graphql/queries' | |
import { onCreateComment as OnCreateComment } from './graphql/subscriptions' |
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 { | |
Account, | |
clusterApiUrl, | |
Connection, | |
PublicKey, | |
sendAndConfirmTransaction, | |
SystemProgram, | |
Transaction, | |
} from '@solana/web3.js'; |
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 { WebBundlr } from "@bundlr-network/client" | |
import { providers } from "ethers" | |
/* initialize some local state to store the bundlr instance */ | |
const [bundlrInstance, setBundlrInstance] = useState(null) | |
/* connect to the user's wallet */ | |
async function connect() { | |
await window.ethereum.request({ method: 'eth_requestAccounts' }) | |
const provider = new providers.Web3Provider(window.ethereum) |
The first post has been published: https://www.swyx.io/writing/cloud-distros
The second post has been adapted for Temporal: https://www.swyx.io/why-temporal/
these are bullet points of a blogpost on a topic i know very little about but i feel like there is something there that is happening as we speak
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
/* | |
* Resources | |
* Medium: https://medium.com/walletconnect/how-to-build-a-react-native-dapp-with-walletconnect-28f08f332ed7 | |
* YouTube: https://www.youtube.com/watch?v=mGtEPQfqMV8 | |
* Docs: https://docs.walletconnect.com/2.0/advanced/walletconnectmodal/about?platform=react-native | |
*/ | |
import { WalletConnectModal, useWalletConnectModal } from "@walletconnect/modal-react-native" | |
import { StyleSheet, Text, View, TouchableHighlight } from "react-native" | |
const projectId = 'my-project-id' // see https://cloud.walletconnect.com/ |
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
from lib import appsync | |
def lambda_handler(event, context): | |
print(event) | |
input = { | |
'name': 'test123', | |
'description': 'some cool description' | |
} |
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 OR Apache-2.0 | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
contract NFT is ERC721URIStorage { | |
using Counters for Counters.Counter; |
OlderNewer