Skip to content

Instantly share code, notes, and snippets.

[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "proposals",
// Once the page load, check if we have a connected web3 wallet and if we
// allow ETH deposits and if so fetch the ETH deposit address
// and create a transaction with web3.
useEffect(() => {
if (
!(exchangeRates && exchangeRates.isDone) ||
!Web3.givenProvider ||
!window.ethereum ||
invoice.acceptedCurrencies.indexOf('ETH') === -1
) return
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreihrcoc2g4kikikprbeahkymcxrcvrtw2gxxyt3rs75iqt6m343uvq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
// Once the page load, check if we have a connected web3 wallet and if we
// allow ETH deposits and if so fetch the ETH deposit address
// and create a transaction with web3.
useEffect(() => {
if (
!(exchangeRates && exchangeRates.isDone) ||
!Web3.givenProvider ||
!window.ethereum ||
invoice.acceptedCurrencies.indexOf('ETH') === -1
) return
[
{
"constant": true,
"inputs": [],
"name": "mintingFinished",
"outputs": [
{
"name": "",
"type": "bool"
}
[
{
"constant": true,
"inputs": [],
"name": "currentPeriod",
"outputs": [
{
"name": "",
"type": "uint256"
}
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
[
{
"constant": true,
"inputs": [],
"name": "duration",
"outputs": [
{
"name": "",
"type": "uint256"
}
/*
* @dev Calculates the utilization and borrow rates for use by getBorrowRate function
*/
function getUtilizationAndAnnualBorrowRate(uint cash, uint borrows) view internal returns (IRError, Exp memory, Exp memory) {
(IRError err0, Exp memory utilizationRate) = getUtilizationRate(cash, borrows);
if (err0 != IRError.NO_ERROR) {
return (err0, Exp({mantissa: 0}), Exp({mantissa: 0}));
}
// Borrow Rate is 5% + UtilizationRate * 45% (baseRate + UtilizationRate * multiplier);
SELECT
SUM (fees)
FROM (
SELECT
*,
eth * eth_price / 1e18 AS trade_volume,
eth * eth_price * 0.003 / 1e18 AS fees
FROM (
SELECT distinct
a.hash,