Skip to content

Instantly share code, notes, and snippets.

@rahuldamodar94
rahuldamodar94 / gist:47344086a915941d754fb617c66b9015
Created September 25, 2020 08:29
ERC20MintablePredicate.sol
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
@rahuldamodar94
rahuldamodar94 / plasma_mainnet.json
Last active June 23, 2021 07:42
dump_mapped_tokens
{
"0xa45b966996374E9e65ab991C6FE4Bfce3a56DDe8": {
"child_token": "0x8cc8538d60901d19692F5ba22684732Bc28F54A3"
},
"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0": {
"child_token": "0x0000000000000000000000000000000000001010"
},
"0x3db715989dA05C1D17441683B5b41d4510512722": {
"child_token": "0x5E1DDF2e5a0eCDD923692d4b4429d8603825A8C6"
},
let Web3 = require("web3");
let artifacts = require("./abi.json");
const provider = new Web3.providers.WebsocketProvider(
"wss://ws-mumbai.matic.today"
);
const web3 = new Web3(provider);
const rootContractInstance = new web3.eth.Contract(
artifacts,
After you install dependecies, go to node_modules/@0x/contract-addresses/lib/addresses.json
and add the following to the list of addresses
"80001":{
"erc20Proxy": "0x0b47076aaa5246411458fcf85494f41bbfdb8470",
"erc721Proxy": "0xff7ca10af37178bdd056628ef42fd7f799fac77c",
"erc1155Proxy": "0x53d791f18155c211ff8b58671d0f7e9b50e596ad",
"zrxToken": "0x5af2b282779c7d4ffc69ca4e6e16676747f5c56b",
"etherToken": "0x5b5e11e4818cceba3e82ca9b97cd0ab80be75ad3",
"exchange": "0x533dc89624dcc012c7323b41f286bd2df478800b",
DEPLOYMENT_NETWORK=testnet
DEPLOYMENT_VERSION=mumbai
MAIN_RPC=https://goerli.infura.io/v3/70645f042c3a409599c60f96f6dd9fbc
MATIC_RPC=https://rpc-mumbai.matic.today
MARKETPLACE_API_HOST=https://marketplace.api.matic.today/api/v1
FILE_HOST=https://marketplace.api.matic.today/
DISPLAY_SALE_TAG_TIME=2
pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
let Web3 = require("web3");
// Replace value of rpc with https://rpc-mumbai.matic.today for Mumbai
let rpc = "https://rpc-mainnet.matic.network";
const provider = new Web3.providers.HttpProvider(rpc);
const web3 = new Web3(provider);
// Add your private key
web3.eth.accounts.wallet.add("pvt-key");
var prompt = require("prompt");
var array = [
[0, 0, 0, 0, 0],
[0, 16, 0, 0, 0],
[0, 4, 0, 0, 0],
[16, 32, 0, 0, 0],
[8, 16, 0, 0, 0],
[4, 8, 4, 0, 0],
];
// File: @openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
/**
* @dev Collection of functions related to the address type
*/
library Address {
pragma solidity ^0.6.0;
/**
@author The Calystral Team
@title The ERC1155CalystralMixedFungibleMintable' Interface
*/
interface IERC1155CalystralMixedFungibleMintable {
/**
@dev MUST emit when a release timestamp is set or updated.
The `typeId` argument MUST be the id of a type.