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 'base64' | |
module Arweave | |
class Transaction | |
attr_reader :attributes | |
def initialize(attributes) | |
@attributes = | |
{ | |
id: '', |
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 'json/jwt' | |
require 'base64' | |
require 'digest' | |
module Arweave | |
class Wallet | |
attr_reader :address, :owner | |
def initialize(jwk) | |
@jwk = jwk.transform_keys!(&:to_sym) |
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
d = [ | |
30_644_250_780, | |
9_003_106_878, | |
30_636_278_846, | |
66_641_217_692, | |
4_501_790_980, | |
671_24_603036, | |
131_61973916, | |
66_606629_920, | |
30_642_677_916, |
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
d=[30644250780,9003106878, | |
30636278846,66641217692,4501790980, | |
671_24_603036,131_61973916,66_606629_920, | |
30642677916,30643069058];a,s=[],$*[0] | |
s.each_byte{|b|a<<("%036b"%d[b. | |
chr.to_i]).scan(/\d{6}/)} | |
a.transpose.each{ |a| | |
a.join.each_byte{\ | |
|i|print i==49?\ | |
($*[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
pre-commit: | |
commands: | |
prettier: | |
files: git diff --name-only --staged | |
glob: "*.rb" | |
run: bundle exec rbprettier --write {files} |
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.6.0; | |
pragma experimental ABIEncoderV2; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; | |
import "@openzeppelin/contracts/GSN/Context.sol"; | |
import "@openzeppelin/contracts/introspection/ERC165.sol"; | |
import "@openzeppelin/contracts/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/utils/Address.sol"; |
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 Web3 from "web3"; | |
import biconomy from "utilities/biconomy"; | |
const domainType = [ | |
{ name: "name", type: "string" }, | |
{ name: "version", type: "string" }, | |
{ name: "chainId", type: "uint256" }, | |
{ name: "verifyingContract", type: "address" } | |
]; |
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
const startMint = async () => { | |
setIsMinting(true); | |
const user = await magic.user.getMetadata(); | |
contract.mint({ | |
from: user.publicAddress, | |
id: license.offering.id, | |
amount: values.amount, | |
onTransactionCreated: transactionHash => { |
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 Web3 from "web3"; | |
import Biconomy from "@biconomy/mexa"; | |
import magic from "utilities/magic"; | |
const provider = new Web3(magic.rpcProvider); | |
const biconomy = new Biconomy(provider, { | |
apiKey: "mbuXCxAWd.7d43ddeb-ee04-42a0-85ac-350ae193d607", | |
debug: 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
import Web3 from "web3"; | |
import axios from "axios"; | |
import config from "utilities/config"; | |
import biconomy from "utilities/biconomy"; | |
import { sleep } from "utilities"; | |
const domainType = [ | |
{ name: "name", type: "string" }, | |
{ name: "version", type: "string" }, |