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.12; | |
pragma experimental ABIEncoderV2; | |
import "./BunchStorage.sol"; | |
contract Bunch is BunchStorage { | |
/** |
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.4.22 <0.7.0; | |
/** | |
* @title Storage | |
* @dev Store & retreive value in a variable | |
*/ | |
contract Storage { | |
uint256 number; |
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.5.0; | |
contract EIP712 { | |
mapping(address => uint256) public nonces; | |
struct EIP712Domain { | |
string name; | |
string version; | |
uint256 chainId; |
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.5.0; | |
contract EIP712 { | |
mapping(address => uint256) public nonces; | |
struct EIP712Domain { | |
string name; | |
string version; | |
uint256 chainId; |
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.5.0; | |
contract EIP712 { | |
mapping(address => uint256) public nonces; | |
struct EIP712Domain { | |
string name; | |
string version; | |
uint256 chainId; |
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.5.0; | |
contract EIP712 { | |
mapping(address => uint256) public nonces; | |
struct EIP712Domain { | |
string name; | |
string version; | |
uint256 chainId; |
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
// Abstract contract for the full ERC 20 Token standard | |
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md | |
pragma solidity ^0.4.21; | |
contract EIP20Interface { | |
/* This is a slight change to the ERC20 base standard. | |
function totalSupply() constant returns (uint256 supply); | |
is replaced with: | |
uint256 public totalSupply; |
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
// Abstract contract for the full ERC 20 Token standard | |
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md | |
pragma solidity ^0.4.21; | |
contract EIP20Interface { | |
/* This is a slight change to the ERC20 base standard. | |
function totalSupply() constant returns (uint256 supply); | |
is replaced with: | |
uint256 public totalSupply; |
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
const contractAddress = "0x722870Eca028c681994c4d82DA3b82f1263Ca07e"; | |
const contractAbi = [{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}] | |
const myContract = new web3.eth.Contract(contractAbi, contractAddress); | |
(function deposit(){ | |
await myContract.methods.deposit.send({from : userAddress,value :1000000000000000000})})(); |
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.5.0; | |
interface CtokenInterface { | |
function mint() external payable; | |
function transfer(address, uint256) external returns (bool); | |
function balanceOf(address owner) external view returns (uint256); | |
} | |
contract Zap{ | |
address cEthAddress = 0xf92FbE0D3C0dcDAE407923b2Ac17eC223b1084E4; |
NewerOlder