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.11; | |
library SafeMath { | |
function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
uint256 c = a + b; | |
require(c >= a, "SafeMath: addition overflow"); | |
return c; | |
} | |
function sub(uint256 a, uint256 b) internal pure returns (uint256) { |
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; | |
/** | |
@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. |
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
// 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 { |
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
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], | |
]; |
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; | |
/* | |
* @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). | |
* |
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
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 |
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
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, |
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
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", |
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
// 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. | |
*/ |
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
let Biconomy = require("@biconomy/mexa"); | |
let abi = require('./testabi.json') | |
let Web3 = require("web3") | |
const biconomy = new Biconomy(window.ethereum,{apiKey: "QmA4kP-Eu.8f858b94-9d32-4d73-9102-13f0e6e60659"}); | |
web3 = new Web3(biconomy); | |
biconomy.onEvent(biconomy.READY, async () => { | |
try{ |