struct Item {
Status status; // The current status of the item.
Request[] requests; // List of status change requests made for the item in the form requests[requestID].
}
struct Request {
bool disputed; // True if a dispute was raised.
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
class BinaryTree { | |
constructor(value, left=null, right=null) { | |
this.value = value | |
this.left = left | |
this.right = right | |
} | |
} |
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
#!/bin/env bash | |
set -euo pipefail | |
[ -z "$1" ] && { | |
cat <<USAGE | |
Usage: | |
$0 <ilk> [--estimate] | |
USAGE |
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
// Copyright (C) 2020, 2021 Lev Livnev <lev@liv.nev.org.uk> | |
// Copyright (C) 2022 Dai Foundation | |
// | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU Affero General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 React, { useEffect, useCallback, useState, useMemo } from 'react'; | |
import t from 'prop-types'; | |
import clsx from 'clsx'; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import Box from '@material-ui/core/Box'; | |
import Slider from '@material-ui/core/Slider'; | |
const useStyles = makeStyles(theme => ({ | |
sliderWrapper: {}, | |
sliderLabel: { |
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; | |
contract Contants { | |
uint256 public constant A = 10; | |
uint256 public constant B = 20; | |
uint256 public constant C = B/A; | |
} |
This example is adapted from the docker-compose file on IPFS Cluster repo.
It enables the usage of the IPFS Proxy API for clusters.
This API automatically pins content to all nodes in the cluster when /add
is called.
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: src/dependencies/IAMB.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.7.2; | |
interface IAMB { | |
function requireToPassMessage( | |
address _contract, | |
bytes memory _data, | |
uint256 _gas |
I hereby claim:
- I am hbarcelos on github.
- I am hbarcelos (https://keybase.io/hbarcelos) on keybase.
- I have a public key ASDXXwdVi-W2TfqEWMFIO6V7uEdAvwN1B_bGUG1bk1jj-Qo
To claim this, I am signing this object:
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 | |
// File: src/dependencies/IAMB.sol | |
pragma solidity ^0.7.2; | |
interface IAMB { | |
function requireToPassMessage( | |
address _contract, | |
bytes memory _data, | |
uint256 _gas | |
) external returns (bytes32); |
NewerOlder