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
require('dotenv').config() | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const http = require('http') | |
const Web3 = require('web3') | |
const HDWalletProvider = require('@truffle/hdwallet-provider') | |
const moment = require('moment-timezone') | |
const numeral = require('numeral') | |
const _ = require('lodash') | |
const axios = require('axios') |
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.7.0 <0.9.0; | |
contract SmartBankAccount { | |
uint totalContractBalance = 0; | |
function getContractBalance() public view returns(uint){ | |
return totalContractBalance; | |
} | |
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.7.0 <0.9.0; | |
contract SmartBankAccount { | |
uint totalContractBalance = 0; | |
function getContractBalance() public returns(uint){ | |
return totalContractBalance; | |
} | |
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.7.0 <0.9.0; | |
contract SmartBankAccount { | |
uint totalContractBalance = 0; | |
function getContractBalance() public returns(uint){ | |
return totalContractBalance; | |
} | |
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.7.0 <0.9.0; | |
contract SmartBankAccount { | |
uint totalContractBalance = 0; | |
function getContractBalance() public view returns(uint){ | |
return totalContractBalance; | |
} | |
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.7.0 <0.9.0; | |
interface cETH { | |
// define functions of COMPOUND we'll be using | |
function mint() external payable; // to deposit to compound | |
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound | |
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.7.0 <0.9.0; | |
contract MyErc20 { | |
string NAME = "MyErc20TokensReallyLongName"; | |
string SYMBOL = "M20"; | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
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.7.0 <0.9.0; | |
contract MyErc20 { | |
string NAME = "MyErc20TokensReallyLongName"; | |
string SYMBOL = "M20"; | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
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.7.0 <0.9.0; | |
contract MyErc20 { | |
string NAME = "MyErc20TokensReallyLongName"; | |
string SYMBOL = "M20"; | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
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.7.0 <0.9.0; | |
contract MyErc20 { | |
string NAME = "MyErc20TokensReallyLongName"; | |
string SYMBOL = "M20"; | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |