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.9; | |
// IMPORTANT | |
// Use 0xf3bE1A4a47576208C1592Cc027087CE154B00672 | |
// As the contract address. Don't deploy from scratch. | |
// To send the mint transaction use 10 Finney as value | |
import 'https://github.com/immutable/zkevm-contracts/blob/master/contracts/token/erc721/abstract/ImmutableERC721Base.sol'; | |
// contracts/royalty-enforcement/RoyaltyAllowlist.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
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
contract MyNFT is ERC721, Ownable { | |
using SafeERC20 for IERC20; |
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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol"; | |
/// @title Open Edition NFT demo | |
/// @author Jhonatan Hernández | |
/// @notice You can use this contract for only the most basic simulation |
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 { ImmutableX, Config, ListTransfersResponse } from '@imtbl/core-sdk'; | |
import { ethers } from 'ethers'; | |
const client = new ImmutableX(Config.PRODUCTION); | |
// fetch all of the transactions where an address has received a specific token | |
const listTransfersOfAssetPerUser = async (user: string, tokenId: string) => { | |
let results: any[] = [], | |
transactionResult: ListTransfersResponse | undefined; | |
do { |
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 sleep = (milliseconds) => { return new Promise(resolve => setTimeout(resolve, milliseconds)) } | |
const waitUntilTransactionIsConfirmed = hash => new Promise(async (succ, err) => { | |
while(true) { | |
const transaction = await web3.eth.getTransactionReceipt(hash) | |
if (transaction) { | |
console.log('transaction status: ', transaction); | |
return (transaction.status ? succ : err)(transaction) | |
} | |
await sleep(1000) // 1 second |
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 retailClient = { | |
id: Number, | |
fName: String, | |
lName: String, | |
email: String, | |
phone: String, | |
instaTowClientId: Number, | |
retailVehicles: Number[], | |
} |
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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721.sol"; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721Receiver.sol"; | |
contract EscrowUWU is IERC721Receiver{ | |
address private auctioncontract; | |
function setAuctionContract(address _auctioncontract) external{ | |
require(auctioncontract == address(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
[ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "_paymentToken", | |
"type": "address" | |
} | |
], | |
"stateMutability": "nonpayable", |
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 { Orchestrator, Config, InstallAgentsHapps } from '@holochain/tryorama' | |
// Set up a Conductor configuration using the handy `Conductor.config` helper. | |
// Read the docs for more on configuration. | |
const conductorConfig = Config.gen() | |
// Construct proper paths for your DNAs | |
const appDna = '../travol.dna.gz' // path.join(__dirname, 'todo_rename_dna.dna.gz') | |
// create an InstallAgentsHapps array with your DNAs to tell tryorama what |
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
#!/usr/bin/env node | |
const { spawn } = require('child_process') | |
let holocServer = null, | |
reactServer = null, | |
holoData = '', | |
reacData = '' | |
process.chdir('frontend') | |
reactServer = spawn('npm',['start']) |
NewerOlder