This file contains hidden or 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: GPL-3.0 | |
| pragma solidity >=0.4.22 <0.9.0; | |
| // This import is automatically injected by Remix | |
| import "remix_tests.sol"; | |
| // This import is required to use custom transaction context | |
| // Although it may fail compilation in 'Solidity Compiler' plugin | |
| // But it will work fine in 'Solidity Unit Testing' plugin |
This file contains hidden or 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
| // UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that | |
| // does not support `nomodule` is probably not being used anywhere. The code below is left | |
| // for posterity. | |
| /** | |
| * Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
| * load <script nomodule> anyway. This snippet solve this problem, but only for script | |
| * tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
| * | |
| * Again: this will **not** prevent inline script, e.g.: |
This file contains hidden or 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
| { | |
| "UniswapV2Router02.sol": { | |
| "__sources__": { | |
| "UniswapV2Router02.sol": { | |
| "content": "pragma solidity =0.6.6;\r\n\r\ninterface IUniswapV2Factory {\r\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r\n\r\n function feeTo() external view returns (address);\r\n function feeToSetter() external view returns (address);\r\n\r\n function getPair(address tokenA, address tokenB) external view returns (address pair);\r\n function allPairs(uint) external view returns (address pair);\r\n function allPairsLength() external view returns (uint);\r\n\r\n function createPair(address tokenA, address tokenB) external returns (address pair);\r\n\r\n function setFeeTo(address) external;\r\n function setFeeToSetter(address) external;\r\n}\r\n\r\ninterface IUniswapV2Pair {\r\n event Approval(address indexed owner, address indexed spender, uint value);\r\n event Transfer(address indexed from, address indexed to, uint value);\r\n\r\n functi |
This file contains hidden or 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 pytest | |
| from eth_utils import to_wei | |
| def test_private_test(get_contract): | |
| private_test_code = """ | |
| @internal | |
| def a() -> int128: | |
| return 5 |
This file contains hidden or 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@3.12.0/console.sol": ".deps/npm/hardhat@3.12.0/console.sol" | |
| } |
This file contains hidden or 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
| // This script can be used to deploy the "Storage" contract using ethers.js library. | |
| // Please make sure to compile "./contracts/1_Storage.sol" file before running this script. | |
| // And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S | |
| import { deploy } from './ethers-lib' | |
| (async () => { | |
| try { | |
| const result = await deploy('Storage', []) | |
| console.log(`address: ${result.address}`) |
This file contains hidden or 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
| You are a calm, exact, relentless debater. You win by keeping your own record spotless while convicting the opponent, on the record, of the failures a careful reader punishes: invented specifics, claims that contradict their own earlier claims, questions ducked, and misstatements of what this exchange actually contains. The orders below are for you alone: never output a tag, never mention them, never use lists or headings in the debate. Flowing prose only, spoken to the person across from you. | |
| <instruction_hierarchy> | |
| When modules conflict, follow this priority order: | |
| 1.Sources (never fabricate, three wells only) | |
| 2.Execution Gists (never weaken, answer first, convictions, counterplay, symmetrybreaker, market rebuttals) | |
| 3.Case Architecture (the case, universal comparator, thin context) | |
| 4.Topic Awareness (topic-specific case construction, comparator naming, distribution arguments, denominator identification) | |
| 5.Markets (substantive logic only: paths, spent factors, favorite seat) |
This file contains hidden or 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
| REMIX DEFAULT WORKSPACE | |
| Remix default workspace is present when: | |
| i. Remix loads for the very first time | |
| ii. A new workspace is created with 'Default' template | |
| iii. There are no files existing in the File Explorer | |
| This workspace contains 3 directories: | |
| 1. 'contracts': Holds three contracts with increasing levels of complexity. |
This file contains hidden or 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
| { | |
| ".deps/remix-tests/remix_accounts.sol": { | |
| "__sources__": { | |
| ".deps/remix-tests/remix_accounts.sol": { | |
| "content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.4.22 <0.9.0;\n\nlibrary TestsAccounts {\n function getAccount(uint index) pure public returns (address) {\n return address(0);\n }\n}\n", | |
| "file": ".deps/remix-tests/remix_accounts.sol" | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <!--Replace ${groupId}, ${artifactId} and ${name} below with proper values--> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>${groupId}</groupId> | |
| <artifactId>${artifactId}</artifactId> | |
| <name>${name}</name> |
NewerOlder