This file contains hidden or 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
function getNetwork(id) { | |
if(id === 4) return "Mainnet" | |
else return "Rinkeby" | |
} | |
function getMateriaAbi() { | |
return [ | |
{ | |
"inputs": [ |
This file contains hidden or 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
"use strict"; | |
/** | |
* Example JavaScript code that interacts with the page and Web3 wallets | |
*/ | |
// Unpkg imports | |
const Web3Modal = window.Web3Modal.default; | |
const WalletConnectProvider = window.WalletConnectProvider.default; |
This file contains hidden or 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.4.0; | |
contract ArraySort { | |
function sort_array(bytes memory arr) private pure returns (bytes) { | |
uint256 l = arr.length; | |
for(uint i = 0; i < l; i++) { | |
for(uint j = i+1; j < l ;j++) { | |
if(arr[i] > arr[j]) { | |
bytes1 temp = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = temp; |