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
> hardhat test "test/stake/test-eve-otc-option.js" | |
Contract: EVE OTC / Oracle | |
addOffer | |
pre conditions | |
✓ Positive offer (70ms) | |
✓ Erroring transfer sale funds (61ms) | |
Token for sale not enabled |
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
> hardhat test "test/stake/test-eve-otc-emergency.js" | |
Contract: EVE OTC / Emergency Functions | |
Pausing the contract | |
✓ Only owner can pause the contract (383ms) | |
When commissions are greater than 1 | |
shouldBehaveLikeBuyAndSell |
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
[{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"oracle_","type":"address"},{"internalType":"bytes32","name":"jobId32_","type":"bytes32"},{"internalType":"string","name":"jobId_","type":"string"},{"internalType":"uint256","name":"oraclePaymentDivider_","type":"uint256"},{"internalType":"string","name":"url_","type":"string"},{"internalType":"int256","name":"multiply_","type":"int256"},{"internalType":"string","name":"addIntParam_","type":"string"},{"internalType":"string","name":"path_","type":"string"},{"internalType":"uint256","name":"oracle_threshold_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cmc_index","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CachedValue","type":"event"},{"anonymous" |
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 consoleLog = false; | |
const { BN, time } = require('@openzeppelin/test-helpers'); | |
const { expect, assert } = require('chai'); | |
const { expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); | |
const { ZERO_ADDRESS } = require('@openzeppelin/test-helpers/src/constants'); | |
const ERC20Mock = artifacts.require('ERC20Mock'); | |
const EVEOTC = artifacts.require('EVEOTC'); |
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 | |
pragma solidity ^0.8.2; | |
import "./Dependencies.sol"; | |
/** | |
* @title CoconutVault | |
* @dev A smart contract for securely storing and managing native coins, ERC-20 tokens, | |
* ERC-721 NFTs, and ERC-1155 NFTs. It includes functionalities for deposits, | |
* withdrawals, and trusted account management in case of emergencies. |
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 | |
pragma solidity ^0.8.2; | |
/** | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with meta-transactions the account sending and | |
* paying for execution may not be the actual sender (as far as an application | |
* is concerned). |
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 | |
pragma solidity ^0.8.2; | |
// Standard OpenZeppelin Contracts | |
import "../utils/Context.sol"; | |
import "../token/ERC20/IERC20.sol"; | |
import "../utils/Address.sol"; | |
import "../token/ERC20/utils/SafeERC20.sol"; | |
import "../security/ReentrancyGuard.sol"; | |
import "../security/Pausable.sol"; |
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 | |
pragma solidity ^0.8.2; | |
// Standard OpenZeppelin Contracts | |
import "../utils/Context.sol"; | |
import "../access/Ownable.sol"; | |
import "../security/ReentrancyGuard.sol"; | |
import "../token/ERC20/IERC20.sol"; | |
import "../token/ERC721/IERC721.sol"; | |
import "../token/ERC1155/IERC1155.sol"; |
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 | |
pragma solidity ^0.8.2; | |
// Standard OpenZeppelin Contracts | |
import "../access/Ownable.sol"; | |
import "../security/ReentrancyGuard.sol"; | |
import "../token/ERC20/IERC20.sol"; | |
import "../utils/Address.sol"; | |
import "../token/ERC20/utils/SafeERC20.sol"; | |
import "../utils/Context.sol"; |
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 | |
pragma solidity ^0.8.2; | |
// Standard OpenZeppelin Contracts | |
import "../access/Ownable.sol"; | |
import "../security/ReentrancyGuard.sol"; | |
import "../token/ERC20/IERC20.sol"; | |
import "../utils/Address.sol"; | |
import "../token/ERC20/utils/SafeERC20.sol"; | |
import "../utils/Context.sol"; |