Merge branch 'master' of https://github.com/ethereum/remix-project into nxwebpack

pull/3161/head
filip mertens 2 years ago
commit a286244e34
  1. 4
      .circleci/config.yml
  2. 44
      apps/debugger/src/app/debugger-api.ts
  3. 7
      apps/debugger/src/app/debugger.ts
  4. 38
      apps/etherscan/src/app/RemixPlugin.tsx
  5. 4
      apps/etherscan/src/app/app.tsx
  6. 25
      apps/etherscan/src/app/utils/scripts.ts
  7. 172
      apps/etherscan/src/app/utils/verify.ts
  8. 177
      apps/etherscan/src/app/views/VerifyView.tsx
  9. 13
      apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts
  10. 2
      apps/remix-ide-e2e/src/commands/clickElementAtPosition.ts
  11. 6
      apps/remix-ide-e2e/src/commands/clickFunction.ts
  12. 8
      apps/remix-ide-e2e/src/commands/testConstantFunction.ts
  13. 4
      apps/remix-ide-e2e/src/commands/waitForElementContainsText.ts
  14. 1
      apps/remix-ide-e2e/src/helpers/hardhat_compilation_7839ba878952cc00ff316061405f273a.json
  15. 113556
      apps/remix-ide-e2e/src/helpers/hardhat_compilation_8a7ab689ec618720f53ce867a3031c03.json
  16. 4
      apps/remix-ide-e2e/src/helpers/hardhat_compilation_Lock.dbg.json
  17. 74
      apps/remix-ide-e2e/src/helpers/hardhat_compilation_Lock.json
  18. 3
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  19. 60
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  20. 2
      apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
  21. 4
      apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts
  22. 44
      apps/remix-ide-e2e/src/tests/etherscan_api.ts
  23. 24
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  24. 21
      apps/remix-ide-e2e/src/tests/proxy.test.ts
  25. 241
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  26. 69
      apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
  27. 2
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  28. 2
      apps/remix-ide-e2e/src/tests/vyper_api.ts
  29. 253
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  30. 274
      apps/remix-ide-e2e/src/tests/workspace_git.test.ts
  31. 3
      apps/remix-ide/ci/browser_test.sh
  32. 1
      apps/remix-ide/ci/flaky.sh
  33. 398
      apps/remix-ide/contracts/foundry/cache/solidity-files-cache.json
  34. 0
      apps/remix-ide/contracts/foundry/foundry.toml
  35. 119
      apps/remix-ide/contracts/foundry/out/Counter.s.sol/CounterScript.json
  36. 377
      apps/remix-ide/contracts/foundry/out/Counter.sol/Counter.json
  37. 763
      apps/remix-ide/contracts/foundry/out/Counter.t.sol/CounterTest.json
  38. 99
      apps/remix-ide/contracts/foundry/out/Script.sol/Script.json
  39. 505
      apps/remix-ide/contracts/foundry/out/Test.sol/Test.json
  40. 219
      apps/remix-ide/contracts/foundry/out/Test.sol/stdError.json
  41. 88
      apps/remix-ide/contracts/foundry/out/Test.sol/stdMath.json
  42. 163
      apps/remix-ide/contracts/foundry/out/Test.sol/stdStorage.json
  43. 1621
      apps/remix-ide/contracts/foundry/out/Vm.sol/Vm.json
  44. 48
      apps/remix-ide/contracts/foundry/out/console.sol/console.json
  45. 48
      apps/remix-ide/contracts/foundry/out/console2.sol/console2.json
  46. 343
      apps/remix-ide/contracts/foundry/out/test.sol/DSTest.json
  47. 14
      apps/remix-ide/contracts/foundry/src/Counter.sol
  48. 0
      apps/remix-ide/contracts/hardhat/artifacts/build-info/.gitgnore
  49. 1
      apps/remix-ide/contracts/hardhat/artifacts/build-info/7839ba878952cc00ff316061405f273a.json
  50. 0
      apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/.gitgnore
  51. 1
      apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.dbg.json
  52. 1
      apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.json
  53. 16
      apps/remix-ide/contracts/hardhat/compiler_config.json
  54. 34
      apps/remix-ide/contracts/hardhat/contracts/Lock.sol
  55. 0
      apps/remix-ide/contracts/hardhat/hardhat.config.js
  56. 121
      apps/remix-ide/contracts/out/Counter.s.sol/CounterScript.metadata.json
  57. 587
      apps/remix-ide/contracts/out/Counter.sol/Counter.json
  58. 82
      apps/remix-ide/contracts/out/Counter.sol/Counter.metadata.json
  59. 561
      apps/remix-ide/contracts/out/Counter.t.sol/CounterTest.metadata.json
  60. 99
      apps/remix-ide/contracts/out/Script.sol/Script.metadata.json
  61. 505
      apps/remix-ide/contracts/out/Test.sol/Test.metadata.json
  62. 219
      apps/remix-ide/contracts/out/Test.sol/stdError.metadata.json
  63. 88
      apps/remix-ide/contracts/out/Test.sol/stdMath.metadata.json
  64. 163
      apps/remix-ide/contracts/out/Test.sol/stdStorage.metadata.json
  65. 1669
      apps/remix-ide/contracts/out/Vm.sol/Vm.metadata.json
  66. 48
      apps/remix-ide/contracts/out/console.sol/console.metadata.json
  67. 48
      apps/remix-ide/contracts/out/console2.sol/console2.metadata.json
  68. 343
      apps/remix-ide/contracts/out/test.sol/DSTest.metadata.json
  69. 0
      apps/remix-ide/contracts/truffle/build/contracts/.gitignore
  70. 18
      apps/remix-ide/contracts/truffle/contracts/Migrations.sol
  71. 0
      apps/remix-ide/contracts/truffle/truffle-config.js
  72. 10
      apps/remix-ide/src/app.js
  73. 2
      apps/remix-ide/src/app/components/plugin-manager-component.js
  74. 3
      apps/remix-ide/src/app/editor/editor.js
  75. 84
      apps/remix-ide/src/app/files/dgitProvider.js
  76. 4
      apps/remix-ide/src/app/files/fileManager.ts
  77. 7
      apps/remix-ide/src/app/files/fileProvider.js
  78. 10
      apps/remix-ide/src/app/files/foundry-handle.js
  79. 8
      apps/remix-ide/src/app/files/git-handle.js
  80. 10
      apps/remix-ide/src/app/files/hardhat-handle.js
  81. 8
      apps/remix-ide/src/app/files/slither-handle.js
  82. 11
      apps/remix-ide/src/app/files/truffle-handle.js
  83. 10
      apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts
  84. 4
      apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts
  85. 8
      apps/remix-ide/src/app/plugins/parser/services/code-parser-imports.ts
  86. 89
      apps/remix-ide/src/app/plugins/remixd-handle.tsx
  87. 4
      apps/remix-ide/src/app/tabs/compile-and-run.ts
  88. 2
      apps/remix-ide/src/app/tabs/compile-tab.js
  89. 75
      apps/remix-ide/src/app/tabs/locale-module.js
  90. 196
      apps/remix-ide/src/app/tabs/locales/en-US.js
  91. 196
      apps/remix-ide/src/app/tabs/locales/zh-CN.js
  92. 6
      apps/remix-ide/src/app/tabs/search.tsx
  93. 13
      apps/remix-ide/src/app/tabs/settings-tab.tsx
  94. 2
      apps/remix-ide/src/app/tabs/web3-provider.js
  95. 8
      apps/remix-ide/src/app/udapp/run-tab.js
  96. 11
      apps/remix-ide/src/app/ui/landing-page/landing-page.js
  97. BIN
      apps/remix-ide/src/assets/img/StarkNetLogo.png
  98. BIN
      apps/remix-ide/src/assets/img/bgRemi.webp
  99. BIN
      apps/remix-ide/src/assets/img/home.webp
  100. 1
      apps/remix-ide/src/assets/img/logoicon.svg
  101. Some files were not shown because too many files have changed in this diff Show More

@ -111,7 +111,7 @@ jobs:
- run: yarn
- run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist
- run: ls -la ./dist/apps/remix-ide/assets/js
- run: yarn run selenium-install
- run: yarn run selenium-install || yarn run selenium-install
- run:
name: Start Selenium
command: yarn run selenium
@ -157,7 +157,7 @@ jobs:
- run: yarn
- run: unzip ./persist/dist.zip
- run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist
- run: yarn run selenium-install
- run: yarn run selenium-install || yarn run selenium-install
- run:
name: Start Selenium
command: yarn run selenium

@ -1,7 +1,7 @@
import Web3 from 'web3'
import {init , traceHelper, TransactionDebugger as Debugger } from '@remix-project/remix-debug'
import { CompilationOutput, Sources } from '@remix-ui/debugger-ui'
import type { CompilationResult } from '@remix-project/remix-solidity-ts'
import { CompilerAbstract } from '@remix-project/remix-solidity'
import { lineText } from '@remix-ui/editor'
export const DebuggerApiMixin = (Base) => class extends Base {
@ -39,10 +39,25 @@ export const DebuggerApiMixin = (Base) => class extends Base {
async discardHighlight () {
await this.call('editor', 'discardHighlight')
await this.call('editor', 'discardLineTexts' as any)
}
async highlight (lineColumnPos, path) {
async highlight (lineColumnPos, path, rawLocation, stepDetail, lineGasCost) {
await this.call('editor', 'highlight', lineColumnPos, path, '', { focus: true })
const label = `${stepDetail.op} costs ${stepDetail.gasCost} gas - this line costs ${lineGasCost} gas - ${stepDetail.gas} gas left`
const linetext: lineText = {
content: label,
position: lineColumnPos,
hide: false,
className: 'text-muted small',
afterContentClassName: 'text-muted small fas fa-gas-pump pl-4',
from: 'debugger',
hoverMessage: [{
value: label,
},
],
}
await this.call('editor', 'addLineText' as any, linetext, path)
}
async getFile (path) {
@ -161,26 +176,3 @@ export const DebuggerApiMixin = (Base) => class extends Base {
}
}
export class CompilerAbstract implements CompilationOutput { // this is a subset of /remix-ide/src/app/compiler/compiler-abstract.js
languageversion
data
source
constructor (languageversion: string, data: CompilationResult, source: { sources: Sources, target: string }) {
this.languageversion = languageversion
this.data = data
this.source = source // source code
}
getSourceName (fileIndex) {
if (this.data && this.data.sources) {
return Object.keys(this.data.sources)[fileIndex]
} else if (Object.keys(this.source.sources).length === 1) {
// if we don't have ast, we return the only one filename present.
const sourcesArray = Object.keys(this.source.sources)
return sourcesArray[0]
}
return null
}
}

@ -1,9 +1,10 @@
import { PluginClient } from "@remixproject/plugin";
import { createClient } from "@remixproject/plugin-webview";
import { IDebuggerApi, RawLocation, Sources, Asts, LineColumnLocation,
import { IDebuggerApi, LineColumnLocation,
onBreakpointClearedListener, onBreakpointAddedListener, onEditorContentChanged, onEnvChangedListener, TransactionReceipt } from '@remix-ui/debugger-ui'
import { DebuggerApiMixin, CompilerAbstract} from './debugger-api'
import { DebuggerApiMixin } from './debugger-api'
import { CompilerAbstract } from '@remix-project/remix-solidity'
export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
constructor () {
super()

@ -0,0 +1,38 @@
import { PluginClient } from '@remixproject/plugin';
import { verify, EtherScanReturn } from './utils/verify';
import { getReceiptStatus, getEtherScanApi, getNetworkName } from './utils';
export class RemixClient extends PluginClient {
loaded() {
return this.onload()
}
async verify (apiKey: string, contractAddress: string, contractArguments: string, contractName: string, compilationResultParam: any) {
const result = await verify(apiKey, contractAddress, contractArguments, contractName, compilationResultParam, this,
(value: EtherScanReturn) => {}, (value: string) => {})
return result
}
async receiptStatus (receiptGuid: string, apiKey: string) {
try {
const network = await getNetworkName(this)
if (network === "vm") {
throw new Error("Cannot check the receipt status in the selected network")
}
const etherscanApi = getEtherScanApi(network)
const receiptStatus = await getReceiptStatus(receiptGuid, apiKey, etherscanApi)
return {
status: receiptStatus,
message: receiptStatus,
succeed: true
}
} catch (e: any){
return {
status: 'error',
message: e.message,
succeed: false
}
}
}
}

@ -5,7 +5,7 @@ import {
CompilationResult,
} from "@remixproject/plugin-api"
import { PluginClient } from "@remixproject/plugin";
import { RemixClient } from "./RemixPlugin";
import { createClient } from "@remixproject/plugin-webview";
import { AppContext } from "./AppContext"
@ -43,7 +43,7 @@ const App = () => {
contractsRef.current = contracts
useEffect(() => {
const client = new PluginClient()
const client = new RemixClient()
createClient(client)
const loadClient = async () => {
await client.onload()

@ -0,0 +1,25 @@
export const verifyScript = `
/**
* @param {string} apikey - etherscan api key.
* @param {string} contractAddress - Address of the contract to verify.
* @param {string} contractArguments - Parameters used in the contract constructor during the initial deployment. It should be the hex encoded value.
* @param {string} contractName - Name of the contract
* @param {string} contractFile - File where the contract is located
* @returns {{ guid, status, message, succeed }} verification result
*/
export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string) => {
const compilationResultParam = await remix.call('compilerArtefacts' as any, 'getCompilerAbstract', contractFile)
console.log('verifying.. ' + contractName)
return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam)
}`
export const receiptGuidScript = `
/**
* @param {string} apikey - etherscan api key.
* @param {string} guid - receipt id.
* @returns {{ status, message, succeed }} receiptStatus
*/
export const receiptStatus = async (apikey: string, guid: string) => {
return await remix.call('etherscan' as any, 'receiptStatus', guid, apikey)
}
`

@ -0,0 +1,172 @@
import { getNetworkName, getEtherScanApi, getReceiptStatus } from "../utils"
import { CompilationResult } from "@remixproject/plugin-api"
import { CompilerAbstract } from '@remix-project/remix-solidity'
import axios from 'axios'
import { PluginClient } from "@remixproject/plugin"
const resetAfter10Seconds = (client: PluginClient, setResults: (value: string) => void) => {
setTimeout(() => {
client.emit("statusChanged", { key: "none" })
setResults("")
}, 10000)
}
export type EtherScanReturn = {
guid: any,
status: any,
}
export const verify = async (
apiKeyParam: string,
contractAddress: string,
contractArgumentsParam: string,
contractName: string,
compilationResultParam: CompilerAbstract,
client: PluginClient,
onVerifiedContract: (value: EtherScanReturn) => void,
setResults: (value: string) => void
) => {
const network = await getNetworkName(client)
if (network === "vm") {
return {
succeed: false,
message: "Cannot verify in the selected network"
}
}
const etherscanApi = getEtherScanApi(network)
try {
const contractMetadata = getContractMetadata(
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
compilationResultParam.data as unknown as CompilationResult,
contractName
)
if (!contractMetadata) {
return {
succeed: false,
message: "Please recompile contract"
}
}
const contractMetadataParsed = JSON.parse(contractMetadata)
const fileName = getContractFileName(
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
compilationResultParam.data as unknown as CompilationResult,
contractName
)
const jsonInput = {
language: 'Solidity',
sources: compilationResultParam.source.sources,
settings: {
optimizer: {
enabled: contractMetadataParsed.settings.optimizer.enabled,
runs: contractMetadataParsed.settings.optimizer.runs
}
}
}
const data: { [key: string]: string | any } = {
apikey: apiKeyParam, // A valid API-Key is required
module: "contract", // Do not change
action: "verifysourcecode", // Do not change
codeformat: "solidity-standard-json-input",
contractaddress: contractAddress, // Contract Address starts with 0x...
sourceCode: JSON.stringify(jsonInput),
contractname: fileName + ':' + contractName,
compilerversion: `v${contractMetadataParsed.compiler.version}`, // see http://etherscan.io/solcversions for list of support versions
constructorArguements: contractArgumentsParam ? contractArgumentsParam.replace('0x', '') : '', // if applicable
}
const body = new FormData()
Object.keys(data).forEach((key) => body.append(key, data[key]))
client.emit("statusChanged", {
key: "loading",
type: "info",
title: "Verifying ...",
})
const response = await axios.post(etherscanApi, body)
const { message, result, status } = await response.data
if (message === "OK" && status === "1") {
resetAfter10Seconds(client, setResults)
const receiptStatus = await getReceiptStatus(
result,
apiKeyParam,
etherscanApi
)
const returnValue = {
guid: result,
status: receiptStatus,
message: `Verification process started correctly. Receipt GUID ${result}`,
succeed: true
}
onVerifiedContract(returnValue)
return returnValue
} else if (message === "NOTOK") {
client.emit("statusChanged", {
key: "failed",
type: "error",
title: result,
})
const returnValue = {
message: result,
succeed: false
}
resetAfter10Seconds(client, setResults)
return returnValue
}
return {
message: 'unknown reason ' + result,
succeed: false
}
} catch (error: any) {
console.error(error)
setResults("Something wrong happened, try again")
return {
message: error.message,
succeed: false
}
}
}
export const getContractFileName = (
compilationResult: CompilationResult,
contractName: string
) => {
const compiledContracts = compilationResult.contracts
let fileName = ""
for (const file of Object.keys(compiledContracts)) {
for (const contract of Object.keys(compiledContracts[file])) {
if (contract === contractName) {
fileName = file
break
}
}
}
return fileName
}
export const getContractMetadata = (
compilationResult: CompilationResult,
contractName: string
) => {
const compiledContracts = compilationResult.contracts
let contractMetadata = ""
for (const file of Object.keys(compiledContracts)) {
for (const contract of Object.keys(compiledContracts[file])) {
if (contract === contractName) {
contractMetadata = compiledContracts[file][contract].metadata
if (contractMetadata) {
break
}
}
}
}
return contractMetadata
}

@ -5,11 +5,10 @@ import {
} from "@remixproject/plugin"
import { Formik, ErrorMessage, Field } from "formik"
import { getNetworkName, getEtherScanApi, getReceiptStatus } from "../utils"
import { SubmitButton } from "../components"
import { Receipt } from "../types"
import { CompilationResult } from "@remixproject/plugin-api"
import axios from 'axios'
import { verify } from "../utils/verify"
import { receiptGuidScript, verifyScript } from "../utils/scripts"
interface Props {
client: PluginClient
@ -24,43 +23,7 @@ interface FormValues {
contractAddress: string
}
export const getContractFileName = (
compilationResult: CompilationResult,
contractName: string
) => {
const compiledContracts = compilationResult.contracts
let fileName = ""
for (const file of Object.keys(compiledContracts)) {
for (const contract of Object.keys(compiledContracts[file])) {
if (contract === contractName) {
fileName = file
break
}
}
}
return fileName
}
export const getContractMetadata = (
compilationResult: CompilationResult,
contractName: string
) => {
const compiledContracts = compilationResult.contracts
let contractMetadata = ""
for (const file of Object.keys(compiledContracts)) {
for (const contract of Object.keys(compiledContracts[file])) {
if (contract === contractName) {
contractMetadata = compiledContracts[file][contract].metadata
if (contractMetadata) {
break
}
}
}
}
return contractMetadata
}
export const VerifyView: React.FC<Props> = ({
apiKey,
@ -80,117 +43,20 @@ export const VerifyView: React.FC<Props> = ({
throw new Error("no compilation result available")
}
const contractArguments = values.contractArguments.replace("0x", "")
const verify = async (
apiKeyParam: string,
contractAddress: string,
contractArgumentsParam: string,
contractName: string,
compilationResultParam: any
) => {
const network = await getNetworkName(client)
if (network === "vm") {
return "Cannot verify in the selected network"
}
const etherscanApi = getEtherScanApi(network)
try {
const contractMetadata = getContractMetadata(
compilationResultParam.data,
contractName
)
if (!contractMetadata) {
return "Please recompile contract"
}
const contractMetadataParsed = JSON.parse(contractMetadata)
const fileName = getContractFileName(
compilationResultParam.data,
contractName
)
const jsonInput = {
language: 'Solidity',
sources: compilationResultParam.source.sources,
settings: {
optimizer: {
enabled: contractMetadataParsed.settings.optimizer.enabled,
runs: contractMetadataParsed.settings.optimizer.runs
}
}
}
const data: { [key: string]: string | any } = {
apikey: apiKeyParam, // A valid API-Key is required
module: "contract", // Do not change
action: "verifysourcecode", // Do not change
codeformat: "solidity-standard-json-input",
contractaddress: contractAddress, // Contract Address starts with 0x...
sourceCode: JSON.stringify(jsonInput),
contractname: fileName + ':' + contractName,
compilerversion: `v${contractMetadataParsed.compiler.version}`, // see http://etherscan.io/solcversions for list of support versions
constructorArguements: contractArgumentsParam, // if applicable
}
const body = new FormData()
Object.keys(data).forEach((key) => body.append(key, data[key]))
client.emit("statusChanged", {
key: "loading",
type: "info",
title: "Verifying ...",
})
const response = await axios.post(etherscanApi, body)
const { message, result, status } = await response.data
if (message === "OK" && status === "1") {
resetAfter10Seconds()
const receiptStatus = await getReceiptStatus(
result,
apiKey,
etherscanApi
)
onVerifiedContract({
guid: result,
status: receiptStatus,
})
return `Contract verified correctly <br> Receipt GUID ${result}`
}
if (message === "NOTOK") {
client.emit("statusChanged", {
key: "failed",
type: "error",
title: result,
})
resetAfter10Seconds()
}
return result
} catch (error) {
console.error(error)
setResults("Something wrong happened, try again")
}
}
const resetAfter10Seconds = () => {
setTimeout(() => {
client.emit("statusChanged", { key: "none" })
setResults("")
}, 10000)
}
const contractArguments = values.contractArguments.replace("0x", "")
const verificationResult = await verify(
apiKey,
values.contractAddress,
contractArguments,
values.contractName,
compilationResult
compilationResult,
client,
onVerifiedContract,
setResults,
)
setResults(verificationResult)
setResults(verificationResult.message)
}
return (
@ -218,9 +84,32 @@ export const VerifyView: React.FC<Props> = ({
>
{({ errors, touched, handleSubmit, isSubmitting }) => (
<form onSubmit={handleSubmit}>
<h6>Verify your smart contracts</h6>
<button
type="button"
style={{ padding: "0.25rem 0.4rem", marginRight: "0.5em", marginBottom: "0.5em"}}
className="btn btn-primary"
title="Generate the necessary helpers to start the verification from a TypeScript script"
onClick={async () => {
if (!await client.call('fileManager', 'exists' as any, 'scripts/etherscan/receiptStatus.ts')) {
await client.call('fileManager', 'writeFile', 'scripts/etherscan/receiptStatus.ts', receiptGuidScript)
await client.call('fileManager', 'open', 'scripts/etherscan/receiptStatus.ts')
} else {
client.call('notification' as any, 'toast', 'file receiptStatus.ts already present..')
}
if (!await client.call('fileManager', 'exists' as any, 'scripts/etherscan/verify.ts')) {
await client.call('fileManager', 'writeFile', 'scripts/etherscan/verify.ts', verifyScript)
await client.call('fileManager', 'open', 'scripts/etherscan/verify.ts')
} else {
client.call('notification' as any, 'toast', 'file verify.ts already present..')
}
}}
>
Generate Etherscan helper scripts
</button>
<div className="form-group">
<h6>Verify your smart contracts</h6>
<label htmlFor="contractName">Contract</label>
<label htmlFor="contractName">Contract</label>
<Field
as="select"
className={

@ -21,15 +21,22 @@ function addInstance (browser: NightwatchBrowser, address: string, isValidFormat
.setValue('.ataddressinput', address, function () {
if (!isValidFormat || !isValidChecksum) browser.assert.elementPresent('button[id^="runAndDeployAtAdressButton"]:disabled')
else if (isAbi) {
browser.click('button[id^="runAndDeployAtAdressButton"]')
.waitForElementPresent('[data-id="udappNotify-modal-footer-ok-react"]')
browser
.click({
selector: '//*[@id="runAndDeployAtAdressButtonContainer"]',
locateStrategy: 'xpath'
})
.waitForElementPresent('[data-id="udappNotify-modal-footer-ok-react"]', 5000)
.execute(function () {
const modal = document.querySelector('[data-id="udappNotify-modal-footer-ok-react"]') as any
modal.click()
})
} else {
browser.click('button[id^="runAndDeployAtAdressButton"]')
browser.click({
selector: '//*[@id="runAndDeployAtAdressButtonContainer"]',
locateStrategy: 'xpath'
})
}
callback()
})

@ -14,7 +14,7 @@ class ClickElement extends EventEmitter {
}
function _clickElement (browser: NightwatchBrowser, cssSelector: string, index: number, forceSelectIfUnselected: boolean, cb: VoidFunction) {
browser.waitForElementPresent(cssSelector)
browser.waitForElementPresent(cssSelector, 5000)
.execute(function (cssSelector: string, index: number, forceSelectIfUnselected: boolean) {
const elem = document.querySelectorAll(cssSelector)[index] as HTMLElement
if (forceSelectIfUnselected) {

@ -3,18 +3,18 @@ import EventEmitter from 'events'
class ClickFunction extends EventEmitter {
command (this: NightwatchBrowser, fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser {
this.api.waitForElementPresent('.instance button[title="' + fnFullName + '"]')
this.api.waitForElementPresent('.instance button[data-title="' + fnFullName + '"]')
.perform(function (client, done) {
client.execute(function () {
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
}, [], function () {
if (expectedInput) {
client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, _ => _)
client.setValue('#runTabView input[data-title="' + expectedInput.types + '"]', expectedInput.values, _ => _)
}
done()
})
})
.scrollAndClick('.instance button[title="' + fnFullName + '"]')
.scrollAndClick('.instance button[data-title="' + fnFullName + '"]')
.pause(2000)
.perform(() => {
this.emit('complete')

@ -15,18 +15,18 @@ class TestConstantFunction extends EventEmitter {
}
function testConstantFunction (browser: NightwatchBrowser, address: string, fnFullName: string, expectedInput: NightwatchTestConstantFunctionExpectedInput, expectedOutput: string, cb: VoidFunction) {
browser.waitForElementPresent('.instance button[title="' + fnFullName + '"]').perform(function (client, done) {
browser.waitForElementPresent('.instance button[data-title="' + fnFullName + '"]').perform(function (client, done) {
client.execute(function () {
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
}, [], function () {
if (expectedInput) {
client.waitForElementPresent('#runTabView input[title="' + expectedInput.types + '"]')
.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values)
client.waitForElementPresent('#runTabView input[data-title="' + expectedInput.types + '"]')
.setValue('#runTabView input[data-title="' + expectedInput.types + '"]', expectedInput.values)
}
done()
})
})
.click(`#instance${address} button[title="${fnFullName}"]`)
.click(`#instance${address} button[data-title="${fnFullName}"]`)
.pause(1000)
.waitForElementPresent('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')
.scrollInto('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')

@ -4,8 +4,10 @@ import EventEmitter from 'events'
class WaitForElementContainsText extends EventEmitter {
command (this: NightwatchBrowser, id: string, value: string, timeout = 10000): NightwatchBrowser {
let waitId // eslint-disable-line
let currentValue
const runid = setInterval(() => {
this.api.getText(id, (result) => {
currentValue = result.value
if (typeof result.value === 'string' && result.value.indexOf(value) !== -1) {
clearInterval(runid)
clearTimeout(waitId)
@ -17,7 +19,7 @@ class WaitForElementContainsText extends EventEmitter {
waitId = setTimeout(() => {
clearInterval(runid)
this.api.assert.fail(`TimeoutError: An error occurred while running .waitForElementContainsText() command on ${id} after ${timeout} milliseconds`)
this.api.assert.fail(`TimeoutError: An error occurred while running .waitForElementContainsText() command on ${id} after ${timeout} milliseconds. expected: ${value} - got: ${currentValue}`)
}, timeout)
return this
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/7839ba878952cc00ff316061405f273a.json"
}

@ -0,0 +1,74 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Lock",
"sourceName": "contracts/Lock.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_unlockTime",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "when",
"type": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address payable",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "unlockTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60806040526040516105e13803806105e1833981810160405281019061002591906100f9565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a9565b60405180910390fd5b60006206ef9190508160008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101c9565b600080fd5b6000819050919050565b6100d6816100c3565b81146100e157600080fd5b50565b6000815190506100f3816100cd565b92915050565b60006020828403121561010f5761010e6100be565b5b600061011d848285016100e4565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b6000610193602383610126565b915061019e82610137565b604082019050919050565b600060208201905081810360008301526101c281610186565b9050919050565b610409806101d86000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea264697066735822122036a0d1608af22fc2fc867e67c4fede260661a25d94e8d38a0f76a2324a7cebe564736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea264697066735822122036a0d1608af22fc2fc867e67c4fede260661a25d94e8d38a0f76a2324a7cebe564736f6c63430008110033",
"linkReferences": {},
"deployedLinkReferences": {}
}

@ -491,8 +491,7 @@ const configFile = `
"": ["ast"],
"*": ["abi", "metadata", "devdoc", "userdoc", "storageLayout", "evm.legacyAssembly", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "evm.gasEstimates", "evm.assembly"]
}
},
"evmVersion": "byzantium"
}
}
}
`

@ -19,8 +19,8 @@ module.exports = {
.clickLaunchIcon('solidity').click('*[data-id="compilerContainerCompileBtn"]')
.pause(4000)
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 60000)
.click('*[title="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-title="Deploy - transact (not payable)"]', 60000)
.click('*[data-title="Deploy - transact (not payable)"]')
.debugTransaction(0)
.waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000)
.clearConsole()
@ -30,8 +30,8 @@ module.exports = {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.clickLaunchIcon('udapp')
.clickInstance(0)
.scrollAndClick('*[title="string name, uint256 goal"]')
.setValue('*[title="string name, uint256 goal"]', '"toast", 999')
.scrollAndClick('*[data-title="string name, uint256 goal"]')
.setValue('*[data-title="string name, uint256 goal"]', '"toast", 999')
.click('*[data-id="createProject - transact (not payable)"]')
.debugTransaction(0)
.pause(2000)
@ -88,7 +88,7 @@ module.exports = {
.clickLaunchIcon('solidity')
.testContracts('externalImport.sol', sources[1]['externalImport.sol'], ['ERC20'])
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 35000)
.waitForElementPresent('*[data-title="Deploy - transact (not payable)"]', 35000)
.selectContract('ERC20')
.createContract('"tokenName", "symbol"')
.debugTransaction(0)
@ -97,11 +97,6 @@ module.exports = {
locateStrategy: 'xpath',
selector: '//*[@data-id="treeViewLivm trace step" and contains(.,"545")]',
})
.goToVMTraceStep(10)
.waitForElementVisible({
locateStrategy: 'xpath',
selector: '//*[@data-id="treeViewLivm trace step" and contains(.,"10")]',
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) {
_name = name_;
@ -109,6 +104,11 @@ module.exports = {
}`) !== -1,
'current displayed content is not from the ERC20 source code')
})
.goToVMTraceStep(10)
.waitForElementVisible({
locateStrategy: 'xpath',
selector: '//*[@data-id="treeViewLivm trace step" and contains(.,"10")]',
})
},
'Should display correct source highlighting while debugging a contract which has ABIEncoderV2 #group2': function (browser: NightwatchBrowser) {
@ -159,7 +159,7 @@ module.exports = {
.clickLaunchIcon('solidity')
.testContracts('locals.sol', sources[3]['locals.sol'], ['testLocals'])
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 40000)
.waitForElementPresent('*[data-title="Deploy - transact (not payable)"]', 40000)
.createContract('')
.pause(2000)
.clearConsole()
@ -191,14 +191,14 @@ module.exports = {
.clickFunction('f - transact (not payable)', { types: 'uint256[] ', values: '[]' })
.debugTransaction(0)
.pause(2000)
.click('*[data-id="debuggerTransactionStartButton"]') // stop debugging
.click('*[id="debuggerTransactionStartButtonContainer"]') // stop debugging
.click('*[data-id="debugGeneratedSourcesLabel"]') // select debug with generated sources
.click('*[data-id="debuggerTransactionStartButton"]') // start debugging
.click('*[id="debuggerTransactionStartButtonContainer"]') // start debugging
.pause(2000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf('if slt(sub(dataEnd, headStart), 32)') !== -1, 'current displayed content is not a generated source')
})
.click('*[data-id="debuggerTransactionStartButton"]')
.click('*[id="debuggerTransactionStartButtonContainer"]')
},
// depends on Should debug using generated sources
'Should call the debugger api: getTrace #group4': function (browser: NightwatchBrowser) {
@ -266,7 +266,7 @@ const sources = [
'blah.sol': {
content: `
pragma solidity >=0.7.0 <0.9.0;
contract Kickstarter {
enum State { Started, Completed }
@ -276,9 +276,9 @@ const sources = [
string name;
uint goal;
State state;
}
}
Project[] public projects;
Project[] public projects;
constructor() {
@ -291,7 +291,7 @@ const sources = [
project.state = State.Started;
project.goal = goal;
}
}
}
`
}
},
@ -309,12 +309,12 @@ const sources = [
function test1 (bytes calldata userData) external returns (bytes memory, bytes32, bytes32, uint) {
bytes32 idAsk = abi.decode(userData[:33], (bytes32));
bytes32 idOffer = abi.decode(userData[32:64], (bytes32));
bytes memory ro = abi.encodePacked(msg.sender, msg.sender, idAsk, idOffer);
return (ro, idAsk, idOffer, userData.length);
}
function testgp (bytes calldata userData) external returns (bytes4) {
return abi.decode(userData[:4], (bytes4));
}
@ -341,9 +341,9 @@ const sources = [
'withGeneratedSources.sol': {
content: `
// SPDX-License-Identifier: GPL-3.0
pragma experimental ABIEncoderV2;
contract A {
function f(uint[] memory) public returns (uint256) { }
pragma experimental ABIEncoderV2;
contract A {
function f(uint[] memory) public returns (uint256) { }
}
`
}
@ -372,7 +372,7 @@ const sources = [
}
/**
* @dev Return value
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
@ -393,14 +393,14 @@ const sources = [
function callA() public {
p = 123;
try b.callB() {
}
catch (bytes memory reason) {
}
}
}
contract B {
C c;
uint p;
@ -413,7 +413,7 @@ const sources = [
c.callC();
}
}
contract C {
uint p;
function callC() public {
@ -498,7 +498,7 @@ const jsGetTrace = `(async () => {
}
})()`
const jsDebug = `(async () => {
const jsDebug = `(async () => {
try {
const result = await remix.call('debugger', 'debug', '0x65f0813753462414f9a91f0aabea946188327995f54b893b63a8d7ff186cfca3')
console.log('result ', result)

@ -28,7 +28,7 @@ module.exports = {
'Loads Main View': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.waitForElementVisible('div[data-id="landingPageHomeContainer"]')
.waitForElementVisible('div[data-id="landingPageHpSections"]')
.waitForElementVisible('div[data-id="remixUIHTAll"]')
.waitForElementVisible('div[data-id="terminalContainer"]')
},

@ -216,7 +216,7 @@ module.exports = {
.waitForElementVisible(autoCompleteLineElement('importedbook'))
.waitForElementVisible(autoCompleteLineElement('importpublicstring'))
.waitForElementVisible(autoCompleteLineElement('publicimport'))
// no private
// no private
.waitForElementNotPresent(autoCompleteLineElement('importprivatestring'))
.waitForElementNotPresent(autoCompleteLineElement('privateimport'))
// no internal
@ -523,4 +523,4 @@ module.exports = {
.sendKeys(this.Keys.ENTER)
})
}
}
}

@ -46,7 +46,16 @@ module.exports = {
.click('[data-id="verify-contract"]')
.waitForElementVisible('[data-id="verify-result"]')
.waitForElementContainsText('[data-id="verify-result"]', 'Contract source code already verified')
}
},
'Should call the etherscan plugin api #group1': function (browser: NightwatchBrowser) {
browser
.frameParent()
.clickLaunchIcon('filePanel')
.addFile('receiptStatusScript.ts', { content: receiptStatusScript })
.click('*[data-id="play-editor"]') // run the script
.waitForElementContainsText('*[data-id="terminalJournal"]', 'Pass - Verified', 60000)
}
}
const verifiedContract = `
@ -105,3 +114,36 @@ contract Owner {
return owner;
}
}`
const receiptStatusScript = `
const receiptStatus = async () => {
try {
const apikey = '2HKUX5ZVASZIKWJM8MIQVCRUVZ6JAWT531'
const ret = await remix.call('etherscan' as any, 'receiptStatus', 'n1qtqfn8jggwqv9uvni5zzectnztqbxqqvizznvl4vg1pndb9v', apikey)
console.log(ret)
} catch (e) {
console.log(e.message)
}
}
receiptStatus()
`
/* eslint-disable */
const verifyScript = `
const verify = async () => {
try {
const apikey = '2HKUX5ZVASZIKWJM8MIQVCRUVZ6JAWT531'
const contractAddress = '0x900d15ce8fc2115c4a870107e5ea855e4243900e'
const contractArguments = '' // hex value without 0x
const contractName = 'Owner'
const contractFile = 'contracts/2_Owner.sol'
const compilationResultParam = await remix.call('compilerArtefacts' as any, 'getCompilerAbstract', contractFile)
console.log('verifying..')
const ret = await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam)
console.log(ret)
} catch (e) {
console.log(e.message)
}
}
verify()
`

@ -133,6 +133,30 @@ module.exports = {
.checkElementStyle(':root', '--info', remixIdeThemes.cyborg.info)
.checkElementStyle(':root', '--warning', remixIdeThemes.cyborg.warning)
.checkElementStyle(':root', '--danger', remixIdeThemes.cyborg.danger)
},
'Should load zh-CN locale ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.scrollAndClick('*[data-id="settingsTabLocaleLabelzh-CN"]')
.pause(2000)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', '设置')
.assert.containsText('*[data-id="listenNetworkCheckInput"]', '监听所有交易')
.assert.containsText('*[data-id="settingsTabGenerateContractMetadataLabel"]', '生成合约元数据')
.assert.containsText('*[data-id="settingsAutoCompleteLabel"]', '在编辑器中启用代码自动补全')
.assert.containsText('*[data-id="settingsShowGasLabel"]', '在编辑器中展示 gas 预算')
.assert.containsText('*[data-id="displayErrorsLabel"]', '编辑代码时展示错误提示')
},
'Should load en-US locale ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.scrollAndClick('*[data-id="settingsTabLocaleLabelen-US"]')
.pause(2000)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
.assert.containsText('*[data-id="listenNetworkCheckInput"]', 'listen on all transactions')
.assert.containsText('*[data-id="settingsTabGenerateContractMetadataLabel"]', 'Generate contract metadata')
.assert.containsText('*[data-id="settingsAutoCompleteLabel"]', 'Enable code completion in editor')
.assert.containsText('*[data-id="settingsShowGasLabel"]', 'Display gas estimates in editor')
.assert.containsText('*[data-id="displayErrorsLabel"]', 'Display errors in editor while typing')
}
}

@ -56,7 +56,7 @@ module.exports = {
browser
.addFile('myTokenV2.sol', sources[1]['myTokenV2.sol'])
.clickLaunchIcon('solidity')
.pause(2000)
.assert.visible('[data-id="compilerContainerCompileBtn"]')
.click('[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000)
.clickLaunchIcon('udapp')
@ -70,12 +70,13 @@ module.exports = {
browser
.openFile('myTokenV1.sol')
.clickLaunchIcon('solidity')
.pause(2000)
.assert.visible('[data-id="compilerContainerCompileBtn"]')
.click('[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('select[id="compiledContracts"] option[value=MyToken]', 60000)
.clickLaunchIcon('udapp')
.click('select.udapp_contractNames')
.click('select.udapp_contractNames option[value=MyToken]')
.verify.visible('[data-id="contractGUIDeployWithProxyLabel"]')
.waitForElementPresent('[data-id="contractGUIDeployWithProxyLabel"]')
.click('[data-id="contractGUIDeployWithProxyLabel"]')
.createContract('')
@ -113,7 +114,7 @@ module.exports = {
.click('[data-id="deployAndRunClearInstances"]')
.addFile('initializeProxy.sol', sources[2]['initializeProxy.sol'])
.clickLaunchIcon('solidity')
.pause(2000)
.assert.visible('[data-id="compilerContainerCompileBtn"]')
.click('[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('select[id="compiledContracts"] option[value=MyInitializedToken]', 60000)
.clickLaunchIcon('udapp')
@ -121,10 +122,12 @@ module.exports = {
.click('select.udapp_contractNames option[value=MyInitializedToken]')
.waitForElementPresent('[data-id="contractGUIDeployWithProxyLabel"]')
.click('[data-id="contractGUIDeployWithProxyLabel"]')
.waitForElementPresent('input[title="tokenName"]')
.waitForElementPresent('input[title="tokenSymbol"]')
.setValue('input[title="tokenName"]', 'Remix')
.setValue('input[title="tokenSymbol"]', "R")
.useXpath()
.waitForElementPresent('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[1]/input')
.waitForElementPresent('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[2]/input')
.setValue('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[1]/input', 'Remix')
.setValue('//*[@id="runTabView"]/div/div[2]/div[3]/div[1]/div/div[1]/div[4]/div/div[2]/input', "R")
.useCss()
.createContract('')
.waitForElementContainsText('[data-id="udappNotifyModalDialogModalTitle-react"]', 'Deploy Implementation & Proxy (ERC1967)')
.waitForElementVisible('[data-id="udappNotify-modal-footer-ok-react"]')
@ -160,7 +163,7 @@ module.exports = {
.click('[data-id="deployAndRunClearInstances"]')
.openFile('myTokenV2.sol')
.clickLaunchIcon('solidity')
.pause(2000)
.assert.visible('[data-id="compilerContainerCompileBtn"]')
.click('[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000)
.clickLaunchIcon('udapp')
@ -202,7 +205,7 @@ module.exports = {
.click('[data-id="deployAndRunClearInstances"]')
.openFile('myTokenV2.sol')
.clickLaunchIcon('solidity')
.pause(2000)
.assert.visible('[data-id="compilerContainerCompileBtn"]')
.click('[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('select[id="compiledContracts"] option[value=MyTokenV2]', 60000)
.clickLaunchIcon('udapp')

@ -1,11 +1,18 @@
'use strict'
import { NightwatchBrowser } from 'nightwatch'
import { writeFileSync } from 'fs'
import init from '../helpers/init'
import * as hardhatCompilation from '../helpers/hardhat_compilation_8a7ab689ec618720f53ce867a3031c03.json'
import { join } from 'path'
import { ChildProcess, spawn } from 'child_process'
import { writeFileSync } from 'fs'
import * as hardhatCompilation from '../helpers/hardhat_compilation_7839ba878952cc00ff316061405f273a.json'
import * as hardhat_compilation_Lock_dbg from '../helpers/hardhat_compilation_Lock.dbg.json'
import * as hardhat_compilation_Lock from '../helpers/hardhat_compilation_Lock.json'
import * as foundryCompilation from '../helpers/foundry_compilation.json'
import * as truffle_compilation from '../helpers/truffle_compilation.json'
import kill from 'tree-kill'
let remixd: ChildProcess
const assetsTestContract = `import "./contract.sol";
contract Assets {
uint[] proposals;
@ -53,24 +60,38 @@ module.exports = {
before: function (browser, done) {
init(browser, done)
},
after: function (browser) {
browser.perform((done) => {
console.log('remixd', remixd.pid)
kill(remixd.pid)
done()
})
},
'@sources': function () {
return sources
},
'start Remixd': function (browser) {
startRemixd(browser)
},
'run Remixd tests #group4': function (browser) {
runTests(browser)
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts'))
console.log('working directory', process.cwd())
connectRemixd(browser, done)
})
.perform((done) => {
runTests(browser, done)
})
},
'Import from node_modules #group1': function (browser) {
/*
when a relative import is used (i.e import "openzeppelin-solidity/contracts/math/SafeMath.sol")
remix (as well as truffle) try to resolve it against the node_modules and installed_contracts folder.
*/
browser.waitForElementVisible('#icon-panel', 2000)
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts'))
console.log('working directory', process.cwd())
connectRemixd(browser, done)
})
.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('filePanel')
.click('[data-path="ballot.sol"]')
.addFile('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol'])
@ -79,30 +100,35 @@ module.exports = {
.testContracts('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol'], ['SafeMath'])
},
'Import from node_modules and reference a github import #group2': function (browser) {
browser.waitForElementVisible('#icon-panel', 2000)
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts'))
console.log('working directory', process.cwd())
connectRemixd(browser, done)
})
.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('filePanel')
.addFile('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol'])
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0
.testContracts('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol'], ['ERC20', 'test11'])
},
'Static Analysis run with remixd #group3': function (browser) {
'Static Analysis run with remixd #group3': '' + function (browser) {
browser.testContracts('test_static_analysis_with_remixd_and_hardhat.sol', sources[5]['test_static_analysis_with_remixd_and_hardhat.sol'], ['test5']).pause(2000)
.clickLaunchIcon('solidityStaticAnalysis')
/*
.click('#staticanalysisButton button').pause(4000)
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
browser
.waitForElementVisible('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.click('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.waitForElementVisible('.highlightLine16', 60000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(
'function _sendLogPayload(bytes memory payload) private view {') !== -1,
'code has not been loaded')
})
})
*/
/*
.click('#staticanalysisButton button').pause(4000)
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
browser
.waitForElementVisible('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.click('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.waitForElementVisible('.highlightLine16', 60000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(
'function _sendLogPayload(bytes memory payload) private view {') !== -1,
'code has not been loaded')
})
})
*/
},
'Run git status': '' + function (browser) {
@ -112,38 +138,85 @@ module.exports = {
.journalLastChildIncludes('On branch ')
},
'Close Remixd #group3': function (browser) {
'Close Remixd #group3': '' + function (browser) {
browser
.clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager *[data-id="pluginManagerComponentDeactivateButtonremixd"]')
},
'Should listen on compilation result from hardhat #group5': function (browser: NightwatchBrowser) {
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts/hardhat'))
console.log('working directory', process.cwd())
writeFileSync('./apps/remix-ide/contracts/artifacts/build-info/c7062fdd360381a85af23eeef31c98f8.json', JSON.stringify(hardhatCompilation))
done()
connectRemixd(browser, done)
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from hardhat').before(60000)
browser.clickLaunchIcon('udapp')
.assert.textContains('*[data-id="udappCompiledBy"]', 'Compiled by hardhat')
.perform((done) => {
console.log('generating compilation result')
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/build-info/7839ba878952cc00ff316061405f273a.json', JSON.stringify(hardhatCompilation))
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.json', JSON.stringify(hardhat_compilation_Lock))
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.dbg.json', JSON.stringify(hardhat_compilation_Lock_dbg))
done()
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Hardhat').before(60000)
browser.clickLaunchIcon('filePanel')
.openFile('contracts')
.openFile('contracts/Lock.sol')
.clickLaunchIcon('udapp')
.selectContract('Lock')
.createContract('1')
.expect.element('*[data-id="terminalJournal"]').text.to.contain('Unlock time should be in the future').before(60000)
},
'Should listen on compilation result from foundry #group6': function (browser: NightwatchBrowser) {
},
'Should load compilation result from hardhat when remixd connects #group6': function (browser: NightwatchBrowser) {
// artifacts/build-info/c7062fdd360381a85af23eeef31c98f8.json has already been created
browser
.perform((done) => {
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.dbg.json', JSON.stringify(hardhat_compilation_Lock_dbg))
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/contracts/Lock.sol/Lock.json', JSON.stringify(hardhat_compilation_Lock))
writeFileSync('./apps/remix-ide/contracts/hardhat/artifacts/build-info/7839ba878952cc00ff316061405f273a.json', JSON.stringify(hardhatCompilation))
done()
})
.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts/hardhat'))
console.log('working directory', process.cwd())
connectRemixd(browser, done)
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Hardhat').before(60000)
browser.clickLaunchIcon('filePanel')
.openFile('contracts')
.openFile('contracts/Lock.sol')
.clickLaunchIcon('udapp')
.selectContract('Lock')
.createContract('1')
.expect.element('*[data-id="terminalJournal"]').text.to.contain('Unlock time should be in the future').before(60000)
},
'Should listen on compilation result from foundry #group7': function (browser: NightwatchBrowser) {
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts/foundry'))
console.log('working directory', process.cwd())
writeFileSync('./apps/remix-ide/contracts/out/Counter.sol/Counter.json', JSON.stringify(foundryCompilation))
done()
connectRemixd(browser, done)
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from foundry').before(60000)
.perform((done) => {
writeFileSync('./apps/remix-ide/contracts/foundry/out/Counter.sol/Counter.json', JSON.stringify(foundryCompilation))
done()
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Foundry').before(60000)
let contractAaddress
browser.clickLaunchIcon('udapp')
.assert.textContains('*[data-id="udappCompiledBy"]', 'Compiled by foundry')
browser.clickLaunchIcon('filePanel')
.openFile('src')
.openFile('src/Counter.sol')
.clickLaunchIcon('udapp')
.selectContract('Counter')
.createContract('')
.getAddressAtPosition(0, (address) => {
@ -156,49 +229,40 @@ module.exports = {
browser.testConstantFunction(contractAaddress, 'number - call', null, '0:\nuint256: 1').perform(() => {
done()
})
})
},
})
},
'Should listen on compilation result from truffle #group8': function (browser: NightwatchBrowser) {
'Should listen on compilation result from truffle #group7': function (browser: NightwatchBrowser) {
browser.perform((done) => {
remixd = spawnRemixd(join(process.cwd(), '/apps/remix-ide', '/contracts/truffle'))
console.log('working directory', process.cwd())
writeFileSync('./apps/remix-ide/contracts/build/contracts/Migrations.json', JSON.stringify(truffle_compilation))
done()
connectRemixd(browser, done)
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from truffle').before(60000)
browser.clickLaunchIcon('udapp')
.assert.textContains('*[data-id="udappCompiledBy"]', 'Compiled by truffle')
.perform((done) => {
writeFileSync('./apps/remix-ide/contracts/truffle/build/contracts/Migrations.json', JSON.stringify(truffle_compilation))
done()
})
.expect.element('*[data-id="terminalJournal"]').text.to.contain('receiving compilation result from Truffle').before(60000)
browser.clickLaunchIcon('filePanel')
.openFile('contracts')
.openFile('contracts/Migrations.sol')
.clickLaunchIcon('udapp')
.selectContract('Migrations')
.createContract('')
.testFunction('last',
{
status: 'true Transaction mined and execution succeed'
})
}
}
})
function startRemixd (browser: NightwatchBrowser) {
const browserName = browser.options.desiredCapabilities.browserName
if (browserName === 'safari' || browserName === 'internet explorer') {
console.log('do not run remixd test for ' + browserName + ': sauce labs doesn\'t seems to handle websocket')
browser.end()
return
}
browser
.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('filePanel')
.clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager *[data-id="pluginManagerComponentActivateButtonremixd"]')
.waitForElementVisible('*[data-id="remixdConnect-modal-footer-ok-react"]', 2000)
.pause(2000)
.click('*[data-id="remixdConnect-modal-footer-ok-react"]')
.pause(10000)
// .click('*[data-id="workspacesModalDialog-modal-footer-ok-react"]')
}
}
function runTests (browser: NightwatchBrowser) {
function runTests(browser: NightwatchBrowser, done: any) {
const browserName = browser.options.desiredCapabilities.browserName
browser.clickLaunchIcon('filePanel')
.waitForElementVisible('[data-path="folder1"]')
@ -230,10 +294,11 @@ function runTests (browser: NightwatchBrowser) {
.waitForElementVisible('[data-path="folder1/renamed_contract_' + browserName + '.sol"]') // check if renamed file is preset
.waitForElementNotPresent('[data-path="folder1/contract_' + browserName + '.sol"]') // check if renamed (old) file is not present
.waitForElementNotPresent('[data-path="folder1/contract_' + browserName + '_toremove.sol"]') // check if removed (old) file is not present
.perform(done())
// .click('[data-path="folder1/renamed_contract_' + browserName + '.sol"]')
}
function testImportFromRemixd (browser: NightwatchBrowser, callback: VoidFunction) {
function testImportFromRemixd(browser: NightwatchBrowser, callback: VoidFunction) {
browser
.waitForElementVisible('[data-path="src"]', 100000)
.click('[data-path="src"]')
@ -245,3 +310,37 @@ function testImportFromRemixd (browser: NightwatchBrowser, callback: VoidFunctio
.verifyContracts(['Assets', 'gmbh'])
.perform(() => { callback() })
}
function spawnRemixd(path: string) {
const remixd = spawn('yarn run remixd', [`-s ${path}`], { cwd: process.cwd(), shell: true, detached: true })
remixd.stdout.on('data', function (data) {
console.log('stdout: ' + data.toString())
})
remixd.stderr.on('err', function (data) {
console.log('err: ' + data.toString())
})
return remixd
}
function connectRemixd(browser: NightwatchBrowser, done: any) {
const browserName = browser.options.desiredCapabilities.browserName
if (browserName === 'safari' || browserName === 'internet explorer') {
console.log('do not run remixd test for ' + browserName + ': sauce labs doesn\'t seems to handle websocket')
browser.end()
done()
return
}
browser
.pause(5000)
.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('filePanel')
.clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager *[data-id="pluginManagerComponentActivateButtonremixd"]')
.waitForElementVisible('*[data-id="remixdConnect-modal-footer-ok-react"]', 2000)
.pause(2000)
.click('*[data-id="remixdConnect-modal-footer-ok-react"]')
.pause(5000)
.perform(() => done())
}

@ -152,9 +152,12 @@ module.exports = {
.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('myTests/simple_storage_test.sol', sources[0]['tests/simple_storage_test.sol'])
.clickLaunchIcon('solidityUnitTesting')
.clearValue('*[data-id="uiPathInput"]')
.setValue('*[data-id="uiPathInput"]', 'myTests')
.execute(() => {
const myQuery: any = document.getElementById('utPath')
myQuery.value = 'myTests'
})
.click('*[data-id="testTabGenerateTestFolder"]')
.saveScreenshot('./reports/screenshots/changeCurrentPathg3.png')
.clickElementAtPosition('.singleTest', 0, { forceSelectIfUnselected: true })
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 60000)
@ -287,7 +290,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000)
.waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalFailed()', 60000)
.waitForElementVisible('*[data-id="dropdownPanelSolidityLocals"]').pause(1000)
.waitForElementContainsText('*[data-id="solidityLocals"]', 'no locals', 60000)
.waitForElementContainsText('*[data-id="solidityLocals"]', 'No data available', 60000)
.goToVMTraceStep(316)
.waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposalFailed()', 60000)
.waitForElementContainsText('*[data-id="functionPanel"]', 'vote(proposal)', 60000)
@ -359,15 +362,15 @@ const sources = [
contract SimpleStorage {
uint public storedData;
constructor() {
storedData = 100;
}
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint retVal) {
return storedData;
}
@ -408,7 +411,7 @@ const sources = [
pragma solidity >=0.4.22 <0.9.0;
contract Kickstarter {
enum State { Started, Completed }
struct Project {
address owner;
string name;
@ -420,10 +423,10 @@ const sources = [
}
uint numProjects;
Project[] public projects;
constructor() {
}
function createProject(string memory name, uint goal) public {
projects.push(); // new line
Project storage project = projects[projects.length - 1];
@ -432,28 +435,28 @@ const sources = [
project.owner = msg.sender;
project.state = State.Started;
}
function fundProject(uint projectId) payable public {
Project storage project = projects[projectId];
// require project exists
// PLEASE CHECK / or erase
// not this: require(projects[projectId].exists, "the project must exist to be funded");
// require for... underflow/overflow protection
project.funders[msg.sender] += msg.value;
project.amountContributed += msg.value;
project.fundsAvailable += msg.value;
if (project.amountContributed >= project.goal) {
project.state = State.Completed;
}
}
// this function is here because we can't use web3 when using the VM
function getContractBalance() public view returns(uint balance) {
return address(this).balance;
}
}
`
},
@ -470,13 +473,13 @@ const sources = [
enum State { Started, Completed }
Kickstarter kickstarter;
function beforeAll () public {
kickstarter = new Kickstarter();
kickstarter.createProject("ProjectA", 123000);
kickstarter.createProject("ProjectB", 100);
}
/// #sender: account-1
/// #value: 10000000
function checkProjectExists () public payable {
@ -512,14 +515,14 @@ const sources = [
(address owner, string memory name, uint goal, uint fundsAvailable, uint amountContributed, Kickstarter.State state) = kickstarter.projects(0);
Assert.equal(amountContributed, 120000, "contributed amount is incorrect");
}
}
`
},
'compilationError_test.sol': {
content: `
pragma solidity ^0.8.0;
contract failOnCompilation {
fallback() {
@ -547,7 +550,7 @@ const sources = [
uint c = a+b;
Assert.equal(a+b, c, "wrong value");
}
}
}
`
},
'tests/ballotFailedDebug_test.sol': {
@ -556,31 +559,31 @@ const sources = [
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/3_Ballot.sol";
contract BallotTest {
bytes32[] proposalNames;
Ballot ballotToTest;
function beforeAll () public {
proposalNames.push(bytes32("candidate1"));
ballotToTest = new Ballot(proposalNames);
}
function checkWinningProposalFailed () public {
ballotToTest.vote(1);
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal");
}
function checkWinningProposalPassed () public {
ballotToTest.vote(0);
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal");
}
function checkWinningProposalAgain () public {
Assert.equal(ballotToTest.winningProposal(), uint(1), "proposal at index 0 should be the winning proposal");
}
function checkWinninProposalWithReturnValue () public view returns (bool) {
return ballotToTest.winningProposal() == 0;
}
@ -594,17 +597,17 @@ const sources = [
import "../contracts/3_Ballot.sol";
import "hardhat/console.sol";
contract BallotTest {
bytes32[] proposalNames;
Ballot ballotToTest;
function beforeAll () public {
proposalNames.push(bytes32("candidate1"));
ballotToTest = new Ballot(proposalNames);
}
function checkWinningProposal () public {
console.log("Inside checkWinningProposal");
ballotToTest.vote(1); // This will revert the transaction
@ -617,13 +620,13 @@ const sources = [
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "hardhat/console.sol";
contract hhLogs {
function beforeAll () public {
console.log('Inside beforeAll');
}
function checkSender () public {
console.log('msg.sender is %s', msg.sender);
Assert.ok(true, "should be true");

@ -7,7 +7,7 @@ module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done, 'http://127.0.0.1:8080?plugins=solidity,udapp', false)
},
'Should execution a simple console command #group1 #group999': function (browser: NightwatchBrowser) {
'Should execution a simple console command #group1': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="terminalCli"]', 10000)
.executeScriptInTerminal('console.log(1 + 1)')

@ -24,7 +24,7 @@ module.exports = {
'Should clone the Vyper repo #group1': function (browser: NightwatchBrowser) {
browser.click('button[data-id="add-repository"]')
.frameParent()
.waitForElementContainsText('*[data-shared="tooltipPopup"]', 'Vyper repository cloned', 30000)
.waitForElementContainsText('*[data-shared="tooltipPopup"]', 'Vyper repository cloned', 60000)
.openFile('examples')
.openFile('examples/auctions')
.openFile('examples/auctions/blind_auction.vy')

@ -52,28 +52,40 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
// check js and ts files are not transformed
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './web3-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.pause(100)
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './ethers-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.pause(100)
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'web3.eth.getAccounts')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.pause(100)
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'ethers.providers')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1,
'Incorrect content')
@ -81,7 +93,10 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]')
.click('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]')
.pause(100)
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'chai')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`const { expect } = require("chai");`) !== -1,
'Incorrect content')
@ -129,29 +144,41 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
// check js and ts files are not transformed
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './web3-lib')]",
locateStrategy: 'xpath',
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './ethers-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'web3.eth.getAccounts')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'ethers.providers')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1,
'Incorrect content')
})
@ -177,29 +204,41 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
// check js and ts files are not transformed
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './web3-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './ethers-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'web3.eth.getAccounts')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'ethers.providers')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1,
'Incorrect content')
})
@ -225,29 +264,41 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
// check js and ts files are not transformed
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
.pause(1000)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './web3-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './ethers-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'web3.eth.getAccounts')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'ethers.providers')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1,
'Incorrect content')
})
@ -274,7 +325,7 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/MyToken.sol"]')
.click('*[data-id="treeViewLitreeViewItemcontracts/MyToken.sol"]')
.pause(1000)
.getEditorValue((content) => {
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable, PausableUpgradeable, ERC1155BurnableUpgradeable, UUPSUpgradeable {`) !== -1,
'Incorrect content')
})
@ -282,22 +333,31 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
// check js and ts files are not transformed
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './web3-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, './ethers-lib')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1,
'Incorrect content')
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'web3.eth.getAccounts')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1,
'Incorrect content')
browser.assert.ok(content.indexOf(`gas: gas || 3600000`) !== -1,
@ -305,8 +365,11 @@ module.exports = {
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]')
.pause(100)
.getEditorValue((content) => {
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'ethers.providers')]",
locateStrategy: 'xpath'
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1,
'Incorrect content')
})
@ -324,20 +387,20 @@ module.exports = {
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.pause(1000)
.addFile('test.sol', { content: 'test' })
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]')
.waitForElementPresent({
selector: "//div[contains(@class, 'view-line') and contains(.//span, 'test')]",
locateStrategy: 'xpath'
})
.click('*[data-id="workspaceCreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]')
.setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.pause(2000)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.pause(2000)
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]')
.pause(2000)
.switchWorkspace('workspace_name')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.currentWorkspaceIs('workspace_name')
@ -345,7 +408,15 @@ module.exports = {
'Should rename a workspace #group1': function (browser: NightwatchBrowser) {
browser
.click('*[data-id="workspaceRename"]') // rename workspace_name
.useXpath()
.waitForElementPresent({
selector: '//i[@data-icon="workspaceDropdownMenuIcon"]',
locateStrategy: 'xpath',
})
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[3]') // rename workspace_name
.useCss()
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextRename"]')
.click('*[data-id="modalDialogCustomPromptTextRename"]')
@ -353,6 +424,7 @@ module.exports = {
.setValue('*[data-id="modalDialogCustomPromptTextRename"]', 'workspace_name_renamed')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.pause(2000)
.switchWorkspace('workspace_name_1')
.pause(2000)
.currentWorkspaceIs('workspace_name_1')
@ -365,94 +437,19 @@ module.exports = {
'Should delete a workspace #group1': function (browser: NightwatchBrowser) {
browser
.switchWorkspace('workspace_name_1')
.click('*[data-id="workspaceDelete"]') // delete workspace_name_1
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.waitForElementVisible('[data-id="workspacesSelect"]')
.click('[data-id="workspacesSelect"]')
.switchWorkspace('workspace_name_1')//*[@id="workspacesMenuDropdown"]/span
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[2]') // delete workspace_name_1
.waitForElementVisible('//*[@id="fileExplorerView"]/div[2]/div/div/div[2]')
.click('//*[@id="fileExplorerView"]/div[2]/div/div/div[3]/button')
.waitForElementVisible('//*[@id="workspacesSelect"]')
.click('//*[@id="workspacesSelect"]')
.useCss()
.waitForElementNotPresent(`[data-id="dropdown-item-workspace_name_1"]`)
},
// CLONE REPOSITORY E2E START
'Should clone a repository #group2': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.waitForElementVisible('[data-id="cloneGitRepository"]')
.click('[data-id="cloneGitRepository"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.waitForElementPresent('.fa-spinner')
.pause(5000)
.waitForElementNotPresent('.fa-spinner')
.waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]')
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix')
},
'Should display dgit icon for cloned workspace #group2': function (browser: NightwatchBrowser) {
browser
.switchWorkspace('default_workspace')
.waitForElementNotVisible('[data-id="workspacesSelect"] .fa-code-branch')
.switchWorkspace('awesome-remix')
.waitForElementVisible('[data-id="workspacesSelect"] .fa-code-branch')
},
'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="cloneGitRepository"]')
.click('[data-id="cloneGitRepository"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1')
.waitForElementVisible('[data-id="cloneGitRepository"]')
.click('[data-id="cloneGitRepository"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2')
.waitForElementVisible('[data-id="cloneGitRepository"]')
.click('[data-id="cloneGitRepository"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix3')
.switchWorkspace('awesome-remix')
.switchWorkspace('awesome-remix1')
.switchWorkspace('awesome-remix2')
.switchWorkspace('awesome-remix3')
},
'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="cloneGitRepository"]')
.click('[data-id="cloneGitRepository"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/non-existent-repo')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementVisible('[data-id="cloneGitRepositoryModalDialogModalBody-react"]')
.waitForElementContainsText('[data-id="cloneGitRepositoryModalDialogModalBody-react"]', 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin')
.click('[data-id="cloneGitRepository-modal-footer-ok-react"]')
.end()
},
// CLONE REPOSITORY E2E END
tearDown: sauce
}

@ -0,0 +1,274 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import init from "../helpers/init"
import sauce from "./sauce"
module.exports = {
'@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done)
},
'Should not be able to create GIT without credentials #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.click('*[data-id="workspaceCreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button')
.waitForElementVisible({
selector: "//*[@class='text-warning' and contains(.,'Please add username and email')]",
locateStrategy: 'xpath'
})
.waitForElementPresent({
selector: '//*[@data-id="initGitRepository"][@disabled]',
locateStrategy: 'xpath'
})
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_blank' })
.click('[data-id="initGitRepositoryLabel"]')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() })
.pause(100)
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItem.git"]')
.waitForElementNotVisible('[data-id="workspaceGitPanel"]')
},
'Should add credentials #group1 #group2 #group3': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('settings')
.setValue('[data-id="settingsTabGithubUsername"]', 'circleci')
.setValue('[data-id="settingsTabGithubEmail"]', 'remix@circleci.com')
.click('[data-id="settingsTabSaveGistToken"]')
},
'Should create and initialize a GIT repository #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.waitForElementNotVisible('[data-id="workspaceGitPanel"]')
.click('*[data-id="workspaceCreate"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button')
// eslint-disable-next-line dot-notation
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_blank' })
.click('select[id="wstemplate"]')
.click('select[id="wstemplate"] option[value=blank]')
.click('[data-id="initGitRepositoryLabel"]')
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
.execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() })
.pause(100)
.waitForElementVisible('[data-id="workspaceGitPanel"]')
.waitForElementContainsText('[data-id="workspaceGitBranchesDropdown"]', 'main')
},
// CLONE REPOSITORY E2E START
'Should clone a repository #group2': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.waitForElementPresent('.fa-spinner')
.pause(5000)
.waitForElementNotPresent('.fa-spinner')
.waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]')
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix')
},
'Should display dgit icon for cloned workspace #group2': function (browser: NightwatchBrowser) {
browser
.switchWorkspace('default_workspace')
.waitForElementNotVisible('[data-id="workspacesSelect"] .fa-code-branch')
.switchWorkspace('awesome-remix')
.waitForElementVisible('[data-id="workspacesSelect"] .fa-code-branch')
},
'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) {
browser
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix3')
.switchWorkspace('awesome-remix')
.switchWorkspace('awesome-remix1')
.switchWorkspace('awesome-remix2')
.switchWorkspace('awesome-remix3')
},
'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) {
browser
.useXpath()
.waitForElementPresent({
selector: '//i[@data-icon="workspaceDropdownMenuIcon"]',
locateStrategy: 'xpath',
})
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/non-existent-repo')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.pause(5000)
.waitForElementVisible('[data-id="cloneGitRepositoryModalDialogModalBody-react"]')
.waitForElementContainsText('[data-id="cloneGitRepositoryModalDialogModalBody-react"]', 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin')
.click('[data-id="cloneGitRepository-modal-footer-ok-react"]')
},
// CLONE REPOSITORY E2E END
// GIT BRANCHES E2E START
'Should show all cloned repo branches #group3': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.waitForElementNotVisible('[data-id="workspaceGitPanel"]')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')
.setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ioedeveloper/test-branch-change')
.click('[data-id="fileSystem-modal-footer-ok-react"]')
.waitForElementPresent('.fa-spinner')
.pause(5000)
.waitForElementNotPresent('.fa-spinner')
.waitForElementContainsText('[data-id="workspacesSelect"]', 'test-branch-change')
.waitForElementVisible('[data-id="workspaceGitPanel"]')
.click('[data-id="workspaceGitBranchesDropdown"]')
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementContainsText('[data-id="custom-dropdown-items"]', 'origin/dev')
.waitForElementContainsText('[data-id="custom-dropdown-items"]', 'origin/production')
.waitForElementContainsText('[data-id="custom-dropdown-items"]', 'origin/setup')
.expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ')
},
'Should a checkout to a remote branch #group3': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementContainsText('[data-id="custom-dropdown-items"]', 'origin/dev')
.waitForElementPresent('[data-id="workspaceGit-origin/dev"]')
.click('[data-id="workspaceGit-origin/dev"]')
.pause(5000)
.waitForElementPresent('[data-id="treeViewDivtreeViewItemdev.ts"]')
.click('[data-id="workspaceGitBranchesDropdown"]')
.expect.element('[data-id="workspaceGit-dev"]').text.to.contain('✓ ')
},
'Should search for a branch (local and remote) #group3': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementPresent('[data-id="workspaceGitInput"]')
.sendKeys('[data-id="workspaceGitInput"]', 'setup')
.waitForElementNotPresent('[data-id="workspaceGit-origin/dev"]')
.waitForElementNotPresent('[data-id="workspaceGit-origin/production"]')
.waitForElementNotPresent('[data-id="workspaceGit-dev"]')
.waitForElementNotPresent('[data-id="workspaceGit-main"]')
.waitForElementPresent('[data-id="workspaceGit-origin/setup"]')
},
'Should checkout to a new local branch #group3': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementPresent('[data-id="workspaceGitInput"]')
.clearValue('[data-id="workspaceGitInput"]')
.sendKeys('[data-id="workspaceGitInput"]', 'newLocalBranch')
.waitForElementContainsText('[data-id="workspaceGitCreateNewBranch"]', `Create branch: newLocalBranch from 'dev'`)
.click('[data-id="workspaceGitCreateNewBranch"]')
.pause(2000)
.click('[data-id="workspaceGitBranchesDropdown"]')
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.expect.element('[data-id="workspaceGit-newLocalBranch"]').text.to.contain('✓ ')
},
'Should checkout to an exisiting local branch #group3': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementPresent('[data-id="workspaceGitInput"]')
.clearValue('[data-id="workspaceGitInput"]')
.sendKeys('[data-id="workspaceGitInput"]', [browser.Keys.SPACE, browser.Keys.BACK_SPACE])
.waitForElementPresent('[data-id="workspaceGit-main"]')
.click('[data-id="workspaceGit-main"]')
.pause(2000)
.waitForElementNotPresent('[data-id="treeViewDivtreeViewItemdev.ts"]')
.waitForElementPresent('[data-id="treeViewDivtreeViewItemmain.ts"]')
.click('[data-id="workspaceGitBranchesDropdown"]')
.expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ')
},
'Should prevent checkout to a branch if local changes exists #group3': function (browser: NightwatchBrowser) {
browser
.renamePath('README.md', 'README.txt', 'README.txt')
.waitForElementVisible('[data-id="workspaceGitBranchesDropdown"]')
.click('[data-id="workspaceGitBranchesDropdown"]')
.waitForElementVisible('[data-id="workspaceGit-dev"]')
.click('[data-id="workspaceGit-dev"]')
.waitForElementVisible('[data-id="switchBranchModalDialogContainer-react"]')
.waitForElementContainsText('[data-id="switchBranchModalDialogModalBody-react"]', 'Your local changes to the following files would be overwritten by checkout.')
.click('[data-id="switchBranchModalDialogModalFooter-react"]')
.click('[data-id="switchBranch-modal-footer-cancel-react"]')
.pause(2000)
.click('[data-id="workspaceGitBranchesDropdown"]')
.expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ')
},
'Should force checkout to a branch with exisiting local changes #group3': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('[data-id="workspaceGit-dev"]')
.click('[data-id="workspaceGit-dev"]')
.waitForElementVisible('[data-id="switchBranchModalDialogContainer-react"]')
.waitForElementContainsText('[data-id="switchBranchModalDialogModalBody-react"]', 'Your local changes to the following files would be overwritten by checkout.')
.click('[data-id="switchBranchModalDialogModalFooter-react"]')
.click('[data-id="switchBranch-modal-footer-ok-react"]')
.pause(2000)
.click('[data-id="workspaceGitBranchesDropdown"]')
.expect.element('[data-id="workspaceGit-dev"]').text.to.contain('✓ ')
},
// GIT BRANCHES E2E END
tearDown: sauce
}

@ -11,7 +11,6 @@ TEST_EXITCODE=0
yarn run ganache-cli &
yarn run serve:production &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
yarn run remixd &
sleep 5
@ -21,7 +20,7 @@ yarn run build:e2e
node apps/remix-ide/ci/splice_tests.js $2 $3
TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"

@ -21,7 +21,6 @@ TEST_EXITCODE=0
yarn run ganache-cli &
yarn run serve:production &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
yarn run remixd &
npx nx serve remix-ide-e2e-src-local-plugin &
sleep 5

@ -0,0 +1,398 @@
{
"_format": "ethers-rs-sol-cache-3",
"paths": {
"artifacts": "out",
"build_infos": "out/build-info",
"sources": "src",
"tests": "test",
"scripts": "script",
"libraries": [
"lib"
]
},
"files": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"lastModificationDate": 1661541843388,
"contentHash": "962996f0e05d5218857a538a62d7c47e",
"sourceName": "lib/forge-std/lib/ds-test/src/test.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [],
"versionRequirement": ">=0.5.0",
"artifacts": {
"DSTest": {
"0.8.16+commit.07a7930e.Linux.gcc": "test.sol/DSTest.json"
}
}
},
"lib/forge-std/src/Script.sol": {
"lastModificationDate": 1661541842048,
"contentHash": "b313d0193442f5a12848be9c422a0064",
"sourceName": "lib/forge-std/src/Script.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [
"lib/forge-std/src/Vm.sol",
"lib/forge-std/src/console.sol",
"lib/forge-std/src/console2.sol"
],
"versionRequirement": ">=0.6.0, <0.9.0",
"artifacts": {
"Script": {
"0.8.16+commit.07a7930e.Linux.gcc": "Script.sol/Script.json"
}
}
},
"lib/forge-std/src/Test.sol": {
"lastModificationDate": 1661541842048,
"contentHash": "8e1ae731c7bb8023f36077d86d18693f",
"sourceName": "lib/forge-std/src/Test.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [
"lib/forge-std/lib/ds-test/src/test.sol",
"lib/forge-std/src/Script.sol",
"lib/forge-std/src/Vm.sol",
"lib/forge-std/src/console.sol",
"lib/forge-std/src/console2.sol"
],
"versionRequirement": ">=0.6.0, <0.9.0",
"artifacts": {
"Test": {
"0.8.16+commit.07a7930e.Linux.gcc": "Test.sol/Test.json"
},
"stdError": {
"0.8.16+commit.07a7930e.Linux.gcc": "Test.sol/stdError.json"
},
"stdMath": {
"0.8.16+commit.07a7930e.Linux.gcc": "Test.sol/stdMath.json"
},
"stdStorage": {
"0.8.16+commit.07a7930e.Linux.gcc": "Test.sol/stdStorage.json"
}
}
},
"lib/forge-std/src/Vm.sol": {
"lastModificationDate": 1661541842048,
"contentHash": "225040109969e43ff90255e34aaecc99",
"sourceName": "lib/forge-std/src/Vm.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [],
"versionRequirement": ">=0.6.0, <0.9.0",
"artifacts": {
"Vm": {
"0.8.16+commit.07a7930e.Linux.gcc": "Vm.sol/Vm.json"
}
}
},
"lib/forge-std/src/console.sol": {
"lastModificationDate": 1663196945880,
"contentHash": "100b8a33b917da1147740d7ab8b0ded3",
"sourceName": "lib/forge-std/src/console.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [],
"versionRequirement": ">=0.4.22, <0.9.0",
"artifacts": {
"console": {
"0.8.16+commit.07a7930e.Linux.gcc": "console.sol/console.json"
}
}
},
"lib/forge-std/src/console2.sol": {
"lastModificationDate": 1661541842052,
"contentHash": "5df91f8e93efbfcccf68973dc1b74a70",
"sourceName": "lib/forge-std/src/console2.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [],
"versionRequirement": ">=0.4.22, <0.9.0",
"artifacts": {
"console2": {
"0.8.16+commit.07a7930e.Linux.gcc": "console2.sol/console2.json"
}
}
},
"script/Counter.s.sol": {
"lastModificationDate": 1661541840908,
"contentHash": "0705c52104730a78aef4aa6694175c81",
"sourceName": "script/Counter.s.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [
"lib/forge-std/src/Script.sol",
"lib/forge-std/src/Vm.sol",
"lib/forge-std/src/console.sol",
"lib/forge-std/src/console2.sol"
],
"versionRequirement": "^0.8.13",
"artifacts": {
"CounterScript": {
"0.8.16+commit.07a7930e.Linux.gcc": "Counter.s.sol/CounterScript.json"
}
}
},
"src/Counter.sol": {
"lastModificationDate": 1664875932853,
"contentHash": "ae6c800a2b4c57768024d6e9423d39e8",
"sourceName": "src/Counter.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [],
"versionRequirement": "^0.8.13",
"artifacts": {
"Counter": {
"0.8.16+commit.07a7930e.Linux.gcc": "Counter.sol/Counter.json"
}
}
},
"test/Counter.t.sol": {
"lastModificationDate": 1661541840908,
"contentHash": "5122f4f87ee8fbf9a2468a4c9c780b6a",
"sourceName": "test/Counter.t.sol",
"solcConfig": {
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata"
]
}
},
"evmVersion": "london",
"libraries": {}
}
},
"imports": [
"lib/forge-std/lib/ds-test/src/test.sol",
"lib/forge-std/src/Script.sol",
"lib/forge-std/src/Test.sol",
"lib/forge-std/src/Vm.sol",
"lib/forge-std/src/console.sol",
"lib/forge-std/src/console2.sol",
"src/Counter.sol"
],
"versionRequirement": "^0.8.13",
"artifacts": {
"CounterTest": {
"0.8.16+commit.07a7930e.Linux.gcc": "Counter.t.sol/CounterTest.json"
}
}
}
}
}

@ -57,6 +57,125 @@
"setUp()": "0a9254e4",
"vm()": "3a768463"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"IS_SCRIPT\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"run\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vm\",\"outputs\":[{\"internalType\":\"contract Vm\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"script/Counter.s.sol\":\"CounterScript\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/src/Script.sol\":{\"keccak256\":\"0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a\",\"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f\",\"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]},\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]},\"script/Counter.s.sol\":{\"keccak256\":\"0x01edaa1835b1a5bd3f4f66f73451488b8441d30642d3bf1f5fa2c5bf7c005bee\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3c6a0f19216ceeebf4ec16f8f2662a3bebbe18d4037d1399adf2e3e4ccbb57a2\",\"dweb:/ipfs/Qmc8NknjPkSgbXLg6zZQ8uKT6kAWBvBXz5JrDvZfa88UNT\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "run"
},
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "setUp"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
]
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"script/Counter.s.sol": "CounterScript"
},
"libraries": {}
},
"sources": {
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
],
"license": "MIT"
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
],
"license": "MIT"
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
},
"script/Counter.s.sol": {
"keccak256": "0x01edaa1835b1a5bd3f4f66f73451488b8441d30642d3bf1f5fa2c5bf7c005bee",
"urls": [
"bzz-raw://3c6a0f19216ceeebf4ec16f8f2662a3bebbe18d4037d1399adf2e3e4ccbb57a2",
"dweb:/ipfs/Qmc8NknjPkSgbXLg6zZQ8uKT6kAWBvBXz5JrDvZfa88UNT"
],
"license": "UNLICENSED"
}
},
"version": 1
},
"ast": {
"absolutePath": "script/Counter.s.sol",
"id": 21582,

@ -0,0 +1,377 @@
{
"abi": [
{
"inputs": [],
"name": "increment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "number",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newNumber",
"type": "uint256"
}
],
"name": "setNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": {
"object": "0x608060405234801561001057600080fd5b5060f78061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146053578063d09de08a14606d575b600080fd5b6051604c3660046083565b600055565b005b605b60005481565b60405190815260200160405180910390f35b6051600080549080607c83609b565b9190505550565b600060208284031215609457600080fd5b5035919050565b60006001820160ba57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220f4a9b22e7a2d64c24355b4e7a6f8c62115ca728f26fc2a1e98e364ee91f794fa64736f6c63430008100033",
"sourceMap": "65:192:7:-:0;;;;;;;;;;;;;;;;;;;",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146053578063d09de08a14606d575b600080fd5b6051604c3660046083565b600055565b005b605b60005481565b60405190815260200160405180910390f35b6051600080549080607c83609b565b9190505550565b600060208284031215609457600080fd5b5035919050565b60006001820160ba57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220f4a9b22e7a2d64c24355b4e7a6f8c62115ca728f26fc2a1e98e364ee91f794fa64736f6c63430008100033",
"sourceMap": "65:192:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116:80;;;;;;:::i;:::-;171:6;:18;116:80;;;88:21;;;;;;;;;345:25:9;;;333:2;318:18;88:21:7;;;;;;;202:53;;240:6;:8;;;:6;:8;;;:::i;:::-;;;;;;202:53::o;14:180:9:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:9;;14:180;-1:-1:-1;14:180:9:o;381:232::-;420:3;441:17;;;438:140;;500:10;495:3;491:20;488:1;481:31;535:4;532:1;525:15;563:4;560:1;553:15;438:140;-1:-1:-1;605:1:9;594:13;;381:232::o",
"linkReferences": {}
},
"methodIdentifiers": {
"increment()": "d09de08a",
"number()": "8381f58a",
"setNumber(uint256)": "3fb5c1cb"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"increment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"number\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newNumber\",\"type\":\"uint256\"}],\"name\":\"setNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Counter.sol\":\"Counter\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/Counter.sol\":{\"keccak256\":\"0x09277f949d59a9521708c870dc39c2c434ad8f86a5472efda6a732ef728c0053\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://94cd5258357da018bf911aeda60ed9f5b130dce27445669ee200313cd3389200\",\"dweb:/ipfs/QmNbEfWAqXCtfQpk6u7TpGa8sTHXFLpUz7uebz2FVbchSC\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "increment"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "number",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newNumber",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setNumber"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"src/Counter.sol": "Counter"
},
"libraries": {}
},
"sources": {
"src/Counter.sol": {
"keccak256": "0x09277f949d59a9521708c870dc39c2c434ad8f86a5472efda6a732ef728c0053",
"urls": [
"bzz-raw://94cd5258357da018bf911aeda60ed9f5b130dce27445669ee200313cd3389200",
"dweb:/ipfs/QmNbEfWAqXCtfQpk6u7TpGa8sTHXFLpUz7uebz2FVbchSC"
],
"license": "UNLICENSED"
}
},
"version": 1
},
"ast": {
"absolutePath": "src/Counter.sol",
"id": 21604,
"exportedSymbols": {
"Counter": [
21603
]
},
"nodeType": "SourceUnit",
"src": "39:219:7",
"nodes": [
{
"id": 21583,
"nodeType": "PragmaDirective",
"src": "39:24:7",
"literals": [
"solidity",
"^",
"0.8",
".13"
]
},
{
"id": 21603,
"nodeType": "ContractDefinition",
"src": "65:192:7",
"nodes": [
{
"id": 21585,
"nodeType": "VariableDeclaration",
"src": "88:21:7",
"constant": false,
"functionSelector": "8381f58a",
"mutability": "mutable",
"name": "number",
"nameLocation": "103:6:7",
"scope": 21603,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21584,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "88:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"id": 21595,
"nodeType": "FunctionDefinition",
"src": "116:80:7",
"body": {
"id": 21594,
"nodeType": "Block",
"src": "161:35:7",
"statements": [
{
"expression": {
"id": 21592,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 21590,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21585,
"src": "171:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 21591,
"name": "newNumber",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21587,
"src": "180:9:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "171:18:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21593,
"nodeType": "ExpressionStatement",
"src": "171:18:7"
}
]
},
"functionSelector": "3fb5c1cb",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setNumber",
"nameLocation": "125:9:7",
"parameters": {
"id": 21588,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21587,
"mutability": "mutable",
"name": "newNumber",
"nameLocation": "143:9:7",
"nodeType": "VariableDeclaration",
"scope": 21595,
"src": "135:17:7",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21586,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "135:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "134:19:7"
},
"returnParameters": {
"id": 21589,
"nodeType": "ParameterList",
"parameters": [],
"src": "161:0:7"
},
"scope": 21603,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"id": 21602,
"nodeType": "FunctionDefinition",
"src": "202:53:7",
"body": {
"id": 21601,
"nodeType": "Block",
"src": "230:25:7",
"statements": [
{
"expression": {
"id": 21599,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "240:8:7",
"subExpression": {
"id": 21598,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21585,
"src": "240:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21600,
"nodeType": "ExpressionStatement",
"src": "240:8:7"
}
]
},
"functionSelector": "d09de08a",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "increment",
"nameLocation": "211:9:7",
"parameters": {
"id": 21596,
"nodeType": "ParameterList",
"parameters": [],
"src": "220:2:7"
},
"returnParameters": {
"id": 21597,
"nodeType": "ParameterList",
"parameters": [],
"src": "230:0:7"
},
"scope": 21603,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "Counter",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
21603
],
"name": "Counter",
"nameLocation": "74:7:7",
"scope": 21604,
"usedErrors": []
}
],
"license": "UNLICENSED"
},
"id": 7
}

@ -41,6 +41,105 @@
"IS_SCRIPT()": "f8ccbf47",
"vm()": "3a768463"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"IS_SCRIPT\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vm\",\"outputs\":[{\"internalType\":\"contract Vm\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/Script.sol\":\"Script\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/src/Script.sol\":{\"keccak256\":\"0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a\",\"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f\",\"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]},\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
]
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/Script.sol": "Script"
},
"libraries": {}
},
"sources": {
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
],
"license": "MIT"
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
],
"license": "MIT"
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/Script.sol",
"id": 2023,

@ -153,6 +153,225 @@
"popError()": "b22dc54d",
"zeroVarError()": "b67689da"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"arithmeticError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"assertionError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"divisionError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"encodeStorageError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enumConversionError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"indexOOBError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lowLevelError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"memOverflowError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"popError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zeroVarError\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/Test.sol\":\"stdError\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/lib/ds-test/src/test.sol\":{\"keccak256\":\"0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5\",\"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr\"]},\"lib/forge-std/src/Script.sol\":{\"keccak256\":\"0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a\",\"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z\"]},\"lib/forge-std/src/Test.sol\":{\"keccak256\":\"0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55\",\"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f\",\"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]},\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "arithmeticError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "assertionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "divisionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "encodeStorageError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "enumConversionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "indexOOBError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "lowLevelError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "memOverflowError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "popError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "zeroVarError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdError"
},
"libraries": {}
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
],
"license": "GPL-3.0-or-later"
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
],
"license": "MIT"
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
],
"license": "MIT"
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
],
"license": "MIT"
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/Test.sol",
"id": 4796,

@ -11,6 +11,94 @@
"linkReferences": {}
},
"methodIdentifiers": {},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/Test.sol\":\"stdMath\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/lib/ds-test/src/test.sol\":{\"keccak256\":\"0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5\",\"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr\"]},\"lib/forge-std/src/Script.sol\":{\"keccak256\":\"0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a\",\"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z\"]},\"lib/forge-std/src/Test.sol\":{\"keccak256\":\"0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55\",\"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f\",\"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]},\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdMath"
},
"libraries": {}
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
],
"license": "GPL-3.0-or-later"
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
],
"license": "MIT"
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
],
"license": "MIT"
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
],
"license": "MIT"
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/Test.sol",
"id": 4796,

@ -88,6 +88,169 @@
"methodIdentifiers": {
"bytesToBytes32(bytes,uint256)": "53584939"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4\",\"name\":\"fsig\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keysHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slot\",\"type\":\"uint256\"}],\"name\":\"SlotFound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slot\",\"type\":\"uint256\"}],\"name\":\"WARNING_UninitedSlot\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"b\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"}],\"name\":\"bytesToBytes32\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/Test.sol\":\"stdStorage\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/lib/ds-test/src/test.sol\":{\"keccak256\":\"0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5\",\"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr\"]},\"lib/forge-std/src/Script.sol\":{\"keccak256\":\"0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a\",\"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z\"]},\"lib/forge-std/src/Test.sol\":{\"keccak256\":\"0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55\",\"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f\",\"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp\"]},\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]},\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "who",
"type": "address",
"indexed": false
},
{
"internalType": "bytes4",
"name": "fsig",
"type": "bytes4",
"indexed": false
},
{
"internalType": "bytes32",
"name": "keysHash",
"type": "bytes32",
"indexed": false
},
{
"internalType": "uint256",
"name": "slot",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "SlotFound",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "who",
"type": "address",
"indexed": false
},
{
"internalType": "uint256",
"name": "slot",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "WARNING_UninitedSlot",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes",
"name": "b",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function",
"name": "bytesToBytes32",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
]
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdStorage"
},
"libraries": {}
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
],
"license": "GPL-3.0-or-later"
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
],
"license": "MIT"
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
],
"license": "MIT"
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
],
"license": "MIT"
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/Test.sol",
"id": 4796,

@ -11,6 +11,54 @@
"linkReferences": {}
},
"methodIdentifiers": {},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/console.sol\":\"console\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/src/console.sol\":{\"keccak256\":\"0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70\",\"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/console.sol": "console"
},
"libraries": {}
},
"sources": {
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/console.sol",
"id": 13499,

@ -11,6 +11,54 @@
"linkReferences": {}
},
"methodIdentifiers": {},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/console2.sol\":\"console2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/src/console2.sol\":{\"keccak256\":\"0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f\",\"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/src/console2.sol": "console2"
},
"libraries": {}
},
"sources": {
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
],
"license": "MIT"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/src/console2.sol",
"id": 21563,

@ -309,6 +309,349 @@
"IS_TEST()": "fa7626d4",
"failed()": "ba414fa6"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"log\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"log_address\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"log_bytes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"log_bytes32\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"name\":\"log_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"log_named_address\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"val\",\"type\":\"bytes\"}],\"name\":\"log_named_bytes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"val\",\"type\":\"bytes32\"}],\"name\":\"log_named_bytes32\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"val\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"}],\"name\":\"log_named_decimal_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"val\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"decimals\",\"type\":\"uint256\"}],\"name\":\"log_named_decimal_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"val\",\"type\":\"int256\"}],\"name\":\"log_named_int\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"val\",\"type\":\"string\"}],\"name\":\"log_named_string\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"val\",\"type\":\"uint256\"}],\"name\":\"log_named_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"log_string\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"log_uint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"logs\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"IS_TEST\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"failed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/lib/ds-test/src/test.sol\":\"DSTest\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"lib/forge-std/lib/ds-test/src/test.sol\":{\"keccak256\":\"0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5\",\"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "",
"type": "string",
"indexed": false
}
],
"type": "event",
"name": "log",
"anonymous": false
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address",
"indexed": false
}
],
"type": "event",
"name": "log_address",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes",
"indexed": false
}
],
"type": "event",
"name": "log_bytes",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32",
"indexed": false
}
],
"type": "event",
"name": "log_bytes32",
"anonymous": false
},
{
"inputs": [
{
"internalType": "int256",
"name": "",
"type": "int256",
"indexed": false
}
],
"type": "event",
"name": "log_int",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "address",
"name": "val",
"type": "address",
"indexed": false
}
],
"type": "event",
"name": "log_named_address",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "bytes",
"name": "val",
"type": "bytes",
"indexed": false
}
],
"type": "event",
"name": "log_named_bytes",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "bytes32",
"name": "val",
"type": "bytes32",
"indexed": false
}
],
"type": "event",
"name": "log_named_bytes32",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "int256",
"name": "val",
"type": "int256",
"indexed": false
},
{
"internalType": "uint256",
"name": "decimals",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "log_named_decimal_int",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "uint256",
"name": "val",
"type": "uint256",
"indexed": false
},
{
"internalType": "uint256",
"name": "decimals",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "log_named_decimal_uint",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "int256",
"name": "val",
"type": "int256",
"indexed": false
}
],
"type": "event",
"name": "log_named_int",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "string",
"name": "val",
"type": "string",
"indexed": false
}
],
"type": "event",
"name": "log_named_string",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "key",
"type": "string",
"indexed": false
},
{
"internalType": "uint256",
"name": "val",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "log_named_uint",
"anonymous": false
},
{
"inputs": [
{
"internalType": "string",
"name": "",
"type": "string",
"indexed": false
}
],
"type": "event",
"name": "log_string",
"anonymous": false
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256",
"indexed": false
}
],
"type": "event",
"name": "log_uint",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes",
"indexed": false
}
],
"type": "event",
"name": "logs",
"anonymous": false
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "IS_TEST",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "function",
"name": "failed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"compilationTarget": {
"lib/forge-std/lib/ds-test/src/test.sol": "DSTest"
},
"libraries": {}
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
],
"license": "GPL-3.0-or-later"
}
},
"version": 1
},
"ast": {
"absolutePath": "lib/forge-std/lib/ds-test/src/test.sol",
"id": 1787,

@ -0,0 +1,14 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
contract Counter {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;
}
function increment() public {
number++;
}
}

@ -0,0 +1 @@
{"_format":"hh-sol-dbg-1","buildInfo":"../../build-info/7839ba878952cc00ff316061405f273a.json","default":{"_format":"hh-sol-dbg-1","buildInfo":"../../build-info/7839ba878952cc00ff316061405f273a.json"}}

File diff suppressed because one or more lines are too long

@ -0,0 +1,16 @@
{
"language": "Solidity",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"": ["ast"],
"*": ["abi", "metadata", "devdoc", "userdoc", "storageLayout", "evm.legacyAssembly", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "evm.gasEstimates", "evm.assembly"]
}
}
}
}

@ -0,0 +1,34 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
// Uncomment this line to use console.log
// import "hardhat/console.sol";
contract Lock {
uint public unlockTime;
address payable public owner;
event Withdrawal(uint amount, uint when);
constructor(uint _unlockTime) payable {
require(
block.timestamp < _unlockTime,
"Unlock time should be in the future"
);
uint p = 454545;
unlockTime = _unlockTime;
owner = payable(msg.sender);
}
function withdraw() public {
// Uncomment this line, and the import of "hardhat/console.sol", to print a log in your terminal
// console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp);
require(block.timestamp >= unlockTime, "You can't withdraw yet");
require(msg.sender == owner, "You aren't the owner");
emit Withdrawal(address(this).balance, block.timestamp);
owner.transfer(address(this).balance);
}
}

@ -1,121 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "run",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "setUp",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"script/Counter.s.sol": "CounterScript"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
},
"script/Counter.s.sol": {
"keccak256": "0x01edaa1835b1a5bd3f4f66f73451488b8441d30642d3bf1f5fa2c5bf7c005bee",
"license": "UNLICENSED",
"urls": [
"bzz-raw://3c6a0f19216ceeebf4ec16f8f2662a3bebbe18d4037d1399adf2e3e4ccbb57a2",
"dweb:/ipfs/Qmc8NknjPkSgbXLg6zZQ8uKT6kAWBvBXz5JrDvZfa88UNT"
]
}
},
"version": 1
}

@ -1,587 +0,0 @@
{
"abi": [
{
"inputs": [],
"name": "increment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "number",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newNumber",
"type": "uint256"
}
],
"name": "setNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": {
"object": "0x608060405234801561001057600080fd5b50610125806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033",
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fb5c1cb1460415780638381f58a146052578063d09de08a14606c575b600080fd5b6050604c3660046095565b6072565b005b605a60005481565b60405190815260200160405180910390f35b60506081565b607b81607b60c3565b60005550565b600080549080608e8360d9565b9190505550565b60006020828403121560a657600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111560d35760d360ad565b92915050565b60006001820160e85760e860ad565b506001019056fea2646970667358221220981d705d73c405a1cadf6bcd0ff9f1d0fcbbc1599040e504e71517ff0d8aa53264736f6c63430008100033",
"sourceMap": "65:198:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116:86;;;;;;:::i;:::-;;:::i;:::-;;88:21;;;;;;;;;345:25:9;;;333:2;318:18;88:21:7;;;;;;;208:53;;;:::i;116:86::-;180:15;:9;192:3;180:15;:::i;:::-;171:6;:24;-1:-1:-1;116:86:7:o;208:53::-;246:6;:8;;;:6;:8;;;:::i;:::-;;;;;;208:53::o;14:180:9:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:9;;14:180;-1:-1:-1;14:180:9:o;381:127::-;442:10;437:3;433:20;430:1;423:31;473:4;470:1;463:15;497:4;494:1;487:15;513:125;578:9;;;599:10;;;596:36;;;612:18;;:::i;:::-;513:125;;;;:::o;643:135::-;682:3;703:17;;;700:43;;723:18;;:::i;:::-;-1:-1:-1;770:1:9;759:13;;643:135::o",
"linkReferences": {}
},
"methodIdentifiers": {
"increment()": "d09de08a",
"number()": "8381f58a",
"setNumber(uint256)": "3fb5c1cb"
},
"ast": {
"absolutePath": "src/Counter.sol",
"id": 21628,
"exportedSymbols": {
"Counter": [
21605
],
"CounterYann": [
21627
]
},
"nodeType": "SourceUnit",
"src": "39:427:7",
"nodes": [
{
"id": 21583,
"nodeType": "PragmaDirective",
"src": "39:24:7",
"literals": [
"solidity",
"^",
"0.8",
".13"
]
},
{
"id": 21605,
"nodeType": "ContractDefinition",
"src": "65:198:7",
"nodes": [
{
"id": 21585,
"nodeType": "VariableDeclaration",
"src": "88:21:7",
"constant": false,
"functionSelector": "8381f58a",
"mutability": "mutable",
"name": "number",
"nameLocation": "103:6:7",
"scope": 21605,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21584,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "88:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"id": 21597,
"nodeType": "FunctionDefinition",
"src": "116:86:7",
"body": {
"id": 21596,
"nodeType": "Block",
"src": "161:41:7",
"statements": [
{
"expression": {
"id": 21594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 21590,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21585,
"src": "171:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 21593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 21591,
"name": "newNumber",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21587,
"src": "180:9:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "313233",
"id": 21592,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "192:3:7",
"typeDescriptions": {
"typeIdentifier": "t_rational_123_by_1",
"typeString": "int_const 123"
},
"value": "123"
},
"src": "180:15:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "171:24:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21595,
"nodeType": "ExpressionStatement",
"src": "171:24:7"
}
]
},
"functionSelector": "3fb5c1cb",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setNumber",
"nameLocation": "125:9:7",
"parameters": {
"id": 21588,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21587,
"mutability": "mutable",
"name": "newNumber",
"nameLocation": "143:9:7",
"nodeType": "VariableDeclaration",
"scope": 21597,
"src": "135:17:7",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21586,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "135:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "134:19:7"
},
"returnParameters": {
"id": 21589,
"nodeType": "ParameterList",
"parameters": [],
"src": "161:0:7"
},
"scope": 21605,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"id": 21604,
"nodeType": "FunctionDefinition",
"src": "208:53:7",
"body": {
"id": 21603,
"nodeType": "Block",
"src": "236:25:7",
"statements": [
{
"expression": {
"id": 21601,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "246:8:7",
"subExpression": {
"id": 21600,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21585,
"src": "246:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21602,
"nodeType": "ExpressionStatement",
"src": "246:8:7"
}
]
},
"functionSelector": "d09de08a",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "increment",
"nameLocation": "217:9:7",
"parameters": {
"id": 21598,
"nodeType": "ParameterList",
"parameters": [],
"src": "226:2:7"
},
"returnParameters": {
"id": 21599,
"nodeType": "ParameterList",
"parameters": [],
"src": "236:0:7"
},
"scope": 21605,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "Counter",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
21605
],
"name": "Counter",
"nameLocation": "74:7:7",
"scope": 21628,
"usedErrors": []
},
{
"id": 21627,
"nodeType": "ContractDefinition",
"src": "265:200:7",
"nodes": [
{
"id": 21607,
"nodeType": "VariableDeclaration",
"src": "292:21:7",
"constant": false,
"functionSelector": "8381f58a",
"mutability": "mutable",
"name": "number",
"nameLocation": "307:6:7",
"scope": 21627,
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21606,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "292:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"id": 21619,
"nodeType": "FunctionDefinition",
"src": "320:84:7",
"body": {
"id": 21618,
"nodeType": "Block",
"src": "365:39:7",
"statements": [
{
"expression": {
"id": 21616,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 21612,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21607,
"src": "375:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 21615,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 21613,
"name": "newNumber",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21609,
"src": "384:9:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "39",
"id": 21614,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "396:1:7",
"typeDescriptions": {
"typeIdentifier": "t_rational_9_by_1",
"typeString": "int_const 9"
},
"value": "9"
},
"src": "384:13:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "375:22:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21617,
"nodeType": "ExpressionStatement",
"src": "375:22:7"
}
]
},
"functionSelector": "3fb5c1cb",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setNumber",
"nameLocation": "329:9:7",
"parameters": {
"id": 21610,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21609,
"mutability": "mutable",
"name": "newNumber",
"nameLocation": "347:9:7",
"nodeType": "VariableDeclaration",
"scope": 21619,
"src": "339:17:7",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21608,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "339:7:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "338:19:7"
},
"returnParameters": {
"id": 21611,
"nodeType": "ParameterList",
"parameters": [],
"src": "365:0:7"
},
"scope": 21627,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"id": 21626,
"nodeType": "FunctionDefinition",
"src": "410:53:7",
"body": {
"id": 21625,
"nodeType": "Block",
"src": "438:25:7",
"statements": [
{
"expression": {
"id": 21623,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "448:8:7",
"subExpression": {
"id": 21622,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21607,
"src": "448:6:7",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21624,
"nodeType": "ExpressionStatement",
"src": "448:8:7"
}
]
},
"functionSelector": "d09de08a",
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "increment",
"nameLocation": "419:9:7",
"parameters": {
"id": 21620,
"nodeType": "ParameterList",
"parameters": [],
"src": "428:2:7"
},
"returnParameters": {
"id": 21621,
"nodeType": "ParameterList",
"parameters": [],
"src": "438:0:7"
},
"scope": 21627,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"abstract": false,
"baseContracts": [],
"canonicalName": "CounterYann",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
21627
],
"name": "CounterYann",
"nameLocation": "274:11:7",
"scope": 21628,
"usedErrors": []
}
],
"license": "UNLICENSED"
},
"id": 7
}

@ -1,82 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "increment",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "number",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newNumber",
"type": "uint256"
}
],
"name": "setNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"src/Counter.sol": "Counter"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"src/Counter.sol": {
"keccak256": "0x74eb20a9c3120b64f0e66b02cf476d5d1ff5e07149a4c52b8e774a6800a40b83",
"license": "UNLICENSED",
"urls": [
"bzz-raw://be4d1233bdd7aaf1846eb4c3b94c58914fa4a4b7a2fa4a5734d9d09c562975dc",
"dweb:/ipfs/QmNVGX1nn75pwmWKQjPdV8cy5u5PHuWGbL6TsztchKqmAZ"
]
}
},
"version": 1
}

@ -1,561 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "log_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256[]",
"name": "val",
"type": "uint256[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256[]",
"name": "val",
"type": "int256[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address[]",
"name": "val",
"type": "address[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "log_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "log_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "log_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "val",
"type": "address"
}
],
"name": "log_named_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "val",
"type": "uint256[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256[]",
"name": "val",
"type": "int256[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "address[]",
"name": "val",
"type": "address[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes",
"name": "val",
"type": "bytes"
}
],
"name": "log_named_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "val",
"type": "bytes32"
}
],
"name": "log_named_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
}
],
"name": "log_named_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "val",
"type": "string"
}
],
"name": "log_named_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
}
],
"name": "log_named_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "log_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "logs",
"type": "event"
},
{
"inputs": [],
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "IS_TEST",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "counter",
"outputs": [
{
"internalType": "contract Counter",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "failed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "setUp",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "testIncrement",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
}
],
"name": "testSetNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"test/Counter.t.sol": "CounterTest"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"license": "MIT",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
},
"src/Counter.sol": {
"keccak256": "0x74eb20a9c3120b64f0e66b02cf476d5d1ff5e07149a4c52b8e774a6800a40b83",
"license": "UNLICENSED",
"urls": [
"bzz-raw://be4d1233bdd7aaf1846eb4c3b94c58914fa4a4b7a2fa4a5734d9d09c562975dc",
"dweb:/ipfs/QmNVGX1nn75pwmWKQjPdV8cy5u5PHuWGbL6TsztchKqmAZ"
]
},
"test/Counter.t.sol": {
"keccak256": "0x76bdc40734abcf9acbe5d56422e22662bc218e7d410264f3de6a823036be6a6d",
"license": "UNLICENSED",
"urls": [
"bzz-raw://27118e74e69a15c903cb826430175f337a9ab5cd1bb55a767ae9439e860052bd",
"dweb:/ipfs/QmfNHmcHCDN2eDQpbaDTSRyU4uhcZjpLEdvrudZRLY5knF"
]
}
},
"version": 1
}

@ -1,99 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/Script.sol": "Script"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

@ -1,505 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "log_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256[]",
"name": "val",
"type": "uint256[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256[]",
"name": "val",
"type": "int256[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address[]",
"name": "val",
"type": "address[]"
}
],
"name": "log_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "log_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "log_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "log_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "val",
"type": "address"
}
],
"name": "log_named_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "val",
"type": "uint256[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256[]",
"name": "val",
"type": "int256[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "address[]",
"name": "val",
"type": "address[]"
}
],
"name": "log_named_array",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes",
"name": "val",
"type": "bytes"
}
],
"name": "log_named_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "val",
"type": "bytes32"
}
],
"name": "log_named_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
}
],
"name": "log_named_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "val",
"type": "string"
}
],
"name": "log_named_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
}
],
"name": "log_named_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "log_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "logs",
"type": "event"
},
{
"inputs": [],
"name": "IS_SCRIPT",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "IS_TEST",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "failed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "vm",
"outputs": [
{
"internalType": "contract Vm",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/Test.sol": "Test"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"license": "MIT",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

@ -1,219 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "arithmeticError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "assertionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "divisionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "encodeStorageError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "enumConversionError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "indexOOBError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lowLevelError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "memOverflowError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "popError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "zeroVarError",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdError"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"license": "MIT",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

@ -1,88 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdMath"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"license": "MIT",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

@ -1,163 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "who",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes4",
"name": "fsig",
"type": "bytes4"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "keysHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "slot",
"type": "uint256"
}
],
"name": "SlotFound",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "who",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "slot",
"type": "uint256"
}
],
"name": "WARNING_UninitedSlot",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "b",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
}
],
"name": "bytesToBytes32",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/Test.sol": "stdStorage"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
},
"lib/forge-std/src/Script.sol": {
"keccak256": "0x4424dbcb8f5b741475445726f87408fcd89951fad973bec2ca442ee157f910e7",
"license": "MIT",
"urls": [
"bzz-raw://5b0b9f6dfb69245d8f888558ae82bf1d2cdeace46201444fe4b2e6a5283f944a",
"dweb:/ipfs/QmWFSKeFEZngNcwNn7A84EF7pASo5qe6r5oK24r9Kwca7Z"
]
},
"lib/forge-std/src/Test.sol": {
"keccak256": "0x5d84dd1e27d9127431d6f9aaeb681227235f2b0285545384d1dc236cbcab1364",
"license": "MIT",
"urls": [
"bzz-raw://6fe33b19854be51975ae89d4f4d3074a8b4bbd3c0e4dc5befe84d165f7462b55",
"dweb:/ipfs/Qma45Q6fvwpmke2rdPdZapNqjXv17ReoT4xp4Tnj1JdBd7"
]
},
"lib/forge-std/src/Vm.sol": {
"keccak256": "0xa0ede8e0d3dc3246912530aed6cacbc4703e4430c4b4acd91963ccea709755ea",
"license": "MIT",
"urls": [
"bzz-raw://a28e7d00aab57ad5159247b0f0f268eda4c6980b29eee7f903578254a2be677f",
"dweb:/ipfs/QmZrM8gY5BpW8o1QckmPNCYbBP5Q7k5DkcHdaVULKVntxp"
]
},
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
},
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

File diff suppressed because it is too large Load Diff

@ -1,48 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/console.sol": "console"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/src/console.sol": {
"keccak256": "0x91d5413c2434ca58fd278b6e1e79fd98d10c83931cc2596a6038eee4daeb34ba",
"license": "MIT",
"urls": [
"bzz-raw://91ccea707361e48b9b7a161fe81f496b9932bc471e9c4e4e1e9c283f2453cc70",
"dweb:/ipfs/QmcB66sZhQ6Kz7MUHcLE78YXRUZxoZnnxZjN6yATsbB2ec"
]
}
},
"version": 1
}

@ -1,48 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/src/console2.sol": "console2"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/src/console2.sol": {
"keccak256": "0xbeb823fcdb356244a83aaccdf828ad019ecc1ffaa3dff18e624fc6d5714ea671",
"license": "MIT",
"urls": [
"bzz-raw://4cbe9400340e5f9ec55e2aff3bad1c15fa3afbbe37e80800e6f3fed2ad26854f",
"dweb:/ipfs/QmdJBABsuXkvWxVzEyGXsTE3vyfBPXDdw5xvvtUz3JeoYW"
]
}
},
"version": 1
}

@ -1,343 +0,0 @@
{
"compiler": {
"version": "0.8.16+commit.07a7930e"
},
"language": "Solidity",
"output": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "log_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "log_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "log_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "log_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "val",
"type": "address"
}
],
"name": "log_named_address",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes",
"name": "val",
"type": "bytes"
}
],
"name": "log_named_bytes",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "val",
"type": "bytes32"
}
],
"name": "log_named_bytes32",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "decimals",
"type": "uint256"
}
],
"name": "log_named_decimal_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "int256",
"name": "val",
"type": "int256"
}
],
"name": "log_named_int",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "val",
"type": "string"
}
],
"name": "log_named_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "key",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "val",
"type": "uint256"
}
],
"name": "log_named_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "log_string",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "log_uint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "logs",
"type": "event"
},
{
"inputs": [],
"name": "IS_TEST",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "failed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"lib/forge-std/lib/ds-test/src/test.sol": "DSTest"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":forge-std/=lib/forge-std/src/"
]
},
"sources": {
"lib/forge-std/lib/ds-test/src/test.sol": {
"keccak256": "0xb39cd1d5220cb474947b131e15a4538334b7e886af244b440ae5c9c6bba96a54",
"license": "GPL-3.0-or-later",
"urls": [
"bzz-raw://3101520221449ac0070bda3881311a71d9aa87e5210765e875246922cb5cb5f5",
"dweb:/ipfs/Qmbg6kAHNoG7ox9N9Xqd9Ere2H2XixMFWFqvyPwFCzB3Gr"
]
}
},
"version": 1
}

@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT
// pragma solidity >=0.4.22 <0.8.0;
contract Migrations {
address public owner = msg.sender;
uint public last_completed_migration;
modifier restricted() {
require(
msg.sender == owner,
"This function is restricted to the contract's owner"
);
_;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}

@ -3,6 +3,7 @@ import { RunTab, makeUdapp } from './app/udapp'
import { RemixEngine } from './remixEngine'
import { RemixAppManager } from './remixAppManager'
import { ThemeModule } from './app/tabs/theme-module'
import { LocaleModule } from './app/tabs/locale-module'
import { NetworkModule } from './app/tabs/network-module'
import { Web3ProviderModule } from './app/tabs/web3-provider'
import { CompileAndRun } from './app/tabs/compile-and-run'
@ -115,7 +116,8 @@ class AppComponent {
const matomoDomains = {
'remix-alpha.ethereum.org': 27,
'remix-beta.ethereum.org': 25,
'remix.ethereum.org': 23
'remix.ethereum.org': 23,
'6fd22d6fe5549ad4c4d8fd3ca0b7816b.mod': 35 // remix desktop
}
this.showMatamo =
matomoDomains[window.location.hostname] &&
@ -141,7 +143,10 @@ class AppComponent {
this.gistHandler = new GistHandler()
// ----------------- theme service ---------------------------------
this.themeModule = new ThemeModule()
// ----------------- locale service ---------------------------------
this.localeModule = new LocaleModule()
Registry.getInstance().put({ api: this.themeModule, name: 'themeModule' })
Registry.getInstance().put({ api: this.localeModule, name: 'localeModule' })
// ----------------- editor service ----------------------------
const editor = new Editor() // wrapper around ace editor
@ -237,6 +242,7 @@ class AppComponent {
blockchain,
contentImport,
this.themeModule,
this.localeModule,
editor,
fileManager,
compilerMetadataGenerator,
@ -368,7 +374,7 @@ class AppComponent {
await this.appManager.activatePlugin(['layout'])
await this.appManager.activatePlugin(['notification'])
await this.appManager.activatePlugin(['editor'])
await this.appManager.activatePlugin(['permissionhandler', 'theme', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter'])
await this.appManager.activatePlugin(['permissionhandler', 'theme', 'locale', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter'])
await this.appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs'])
await this.appManager.activatePlugin(['sidePanel']) // activating host plugin separately
await this.appManager.activatePlugin(['home'])

@ -99,7 +99,7 @@ class PluginManagerComponent extends ViewPlugin {
return (
<div id='pluginManager'><PluginViewWrapper plugin={this} /></div>
);
}
getAndFilterPlugins = (filter) => {

@ -50,7 +50,8 @@ class Editor extends Plugin {
abi: 'json',
rs: 'rust',
cairo: 'cairo',
ts: 'typescript'
ts: 'typescript',
move: 'move'
}
this.activated = false

@ -50,6 +50,8 @@ class DGitProvider extends Plugin {
async getGitConfig () {
const workspace = await this.call('filePanel', 'getCurrentWorkspace')
if (!workspace) return
return {
fs: window.remixFileSystemCallback,
dir: addSlash(workspace.absolutePath)
@ -76,6 +78,7 @@ class DGitProvider extends Plugin {
...await this.getGitConfig(),
defaultBranch: (input && input.branch) || 'main'
})
this.emit('init')
}
async status (cmd) {
@ -91,9 +94,7 @@ class DGitProvider extends Plugin {
...await this.getGitConfig(),
...cmd
})
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
this.emit('add')
}
async rm (cmd) {
@ -101,19 +102,19 @@ class DGitProvider extends Plugin {
...await this.getGitConfig(),
...cmd
})
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
}
async checkout (cmd) {
async checkout (cmd, refresh = true) {
await git.checkout({
...await this.getGitConfig(),
...cmd
})
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
if (refresh) {
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
}
this.emit('checkout')
}
async log (cmd) {
@ -124,47 +125,58 @@ class DGitProvider extends Plugin {
return status
}
async remotes () {
async remotes (config) {
let remotes = []
try {
remotes = await git.listRemotes({ ...await this.getGitConfig() })
remotes = await git.listRemotes({ ...config ? config : await this.getGitConfig() })
} catch (e) {
// do nothing
}
return remotes
}
async branch (cmd) {
async branch (cmd, refresh = true) {
const status = await git.branch({
...await this.getGitConfig(),
...cmd
})
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
if (refresh) {
setTimeout(async () => {
await this.call('fileManager', 'refresh')
}, 1000)
}
this.emit('branch')
return status
}
async currentbranch () {
const name = await git.currentBranch({
...await this.getGitConfig()
})
return name
}
async currentbranch (config) {
try{
const defaultConfig = await this.getGitConfig()
const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig
const name = await git.currentBranch(cmd)
async branches () {
const cmd = {
...await this.getGitConfig()
return name
}catch(e){
return ''
}
const remotes = await this.remotes()
let branches = []
branches = (await git.listBranches(cmd)).map((branch) => { return { remote: undefined, name: branch } })
for (const remote of remotes) {
cmd.remote = remote.remote
const remotebranches = (await git.listBranches(cmd)).map((branch) => { return { remote: remote.remote, name: branch } })
branches = [...branches, ...remotebranches]
}
async branches (config) {
try{
const defaultConfig = await this.getGitConfig()
const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig
const remotes = await this.remotes(config)
let branches = []
branches = (await git.listBranches(cmd)).map((branch) => { return { remote: undefined, name: branch } })
for (const remote of remotes) {
cmd.remote = remote.remote
const remotebranches = (await git.listBranches(cmd)).map((branch) => { return { remote: remote.remote, name: branch } })
branches = [...branches, ...remotebranches]
}
return branches
}catch(e){
return []
}
return branches
}
async commit (cmd) {
@ -174,6 +186,7 @@ class DGitProvider extends Plugin {
...await this.getGitConfig(),
...cmd
})
this.emit('commit')
return sha
} catch (e) {
throw new Error(e)
@ -253,6 +266,7 @@ class DGitProvider extends Plugin {
await this.call('fileManager', 'refresh')
}, 1000)
}
this.emit('clone')
return result
}
@ -387,6 +401,8 @@ class DGitProvider extends Plugin {
pinata_api_key: pinataApiKey,
pinata_secret_api_key: pinataSecretApiKey
}
}).catch((e) => {
console.log(e)
})
// also commit to remix IPFS for availability after pinning to Pinata
return await this.export(this.remixIPFS) || result.data.IpfsHash
@ -405,6 +421,8 @@ class DGitProvider extends Plugin {
pinata_api_key: pinataApiKey,
pinata_secret_api_key: pinataSecretApiKey
}
}).catch((e) => {
console.log('Pinata unreachable')
})
return result.data
} catch (error) {

@ -817,8 +817,8 @@ class FileManager extends Plugin {
}
}
async isGitRepo (directory: string): Promise<boolean> {
const path = directory + '/.git'
async isGitRepo (): Promise<boolean> {
const path = '.git'
const exists = await this.exists(path)
return exists

@ -180,7 +180,7 @@ class FileProvider {
const stat = await window.remixFileSystem.stat(path)
try {
if (!stat.isDirectory()) {
return (this.removeFile(path))
return await this.removeFile(path)
} else {
const items = await window.remixFileSystem.readdir(path)
if (items.length !== 0) {
@ -193,11 +193,12 @@ class FileProvider {
}
}
await window.remixFileSystem.rmdir(path)
this.event.emit('fileRemoved', this._normalizePath(path))
} else {
// folder is empty
await window.remixFileSystem.rmdir(path)
}
this.event.emit('fileRemoved', this._normalizePath(path))
this.event.emit('fileRemoved', this._normalizePath(path))
}
}
} catch (e) {
console.log(e)

@ -5,7 +5,7 @@ const profile = {
name: 'foundry',
displayName: 'Foundry',
url: 'ws://127.0.0.1:65525',
methods: [],
methods: ['sync'],
description: 'Using Remixd daemon, allow to access foundry API',
kind: 'other',
version: packageJson.version
@ -15,4 +15,12 @@ export class FoundryHandle extends WebsocketPlugin {
constructor () {
super(profile)
}
callPluginMethod(key, payload = []) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
}

@ -15,4 +15,12 @@ export class GitHandle extends WebsocketPlugin {
constructor () {
super(profile)
}
callPluginMethod(key, payload = []) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
}

@ -5,7 +5,7 @@ const profile = {
name: 'hardhat',
displayName: 'Hardhat',
url: 'ws://127.0.0.1:65522',
methods: ['compile'],
methods: ['compile', 'sync'],
description: 'Using Remixd daemon, allow to access hardhat API',
kind: 'other',
version: packageJson.version
@ -15,4 +15,12 @@ export class HardhatHandle extends WebsocketPlugin {
constructor () {
super(profile)
}
callPluginMethod(key, payload = []) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
}

@ -16,4 +16,12 @@ export class SlitherHandle extends WebsocketPlugin {
constructor () {
super(profile)
}
callPluginMethod(key, payload = []) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
}

@ -5,7 +5,7 @@ const profile = {
name: 'truffle',
displayName: 'truffle',
url: 'ws://127.0.0.1:65524',
methods: ['compile'],
methods: ['compile', 'sync'],
description: 'Using Remixd daemon, allow to access truffle API',
kind: 'other',
version: packageJson.version
@ -15,4 +15,13 @@ export class TruffleHandle extends WebsocketPlugin {
constructor () {
super(profile)
}
callPluginMethod(key, payload = []) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
}

@ -6,9 +6,10 @@ import { CompilationResult, CompilationSource } from '@remix-project/remix-solid
import { CodeParser } from "../code-parser";
import { fileDecoration, fileDecorationType } from '@remix-ui/file-decorators'
import { sourceMappingDecoder } from '@remix-project/remix-debug'
import { CompilerRetriggerMode } from '@remix-project/remix-solidity-ts';
import { CompilerRetriggerMode, CompilationSourceCode } from '@remix-project/remix-solidity-ts';
import { MarkerSeverity } from 'monaco-editor';
import { findLinesInStringWithMatch, SearchResultLine } from '@remix-ui/search'
import { lastCompilationResult } from '@remixproject/plugin-api';
type errorMarker = {
message: string
@ -28,7 +29,7 @@ type errorMarker = {
export default class CodeParserCompiler {
plugin: CodeParser
compiler: any // used to compile the current file seperately from the main compiler
onAstFinished: (success: any, data: CompilationResult, source: CompilationSource, input: any, version: any) => Promise<void>;
onAstFinished: (success: any, data: CompilationResult, source: CompilationSourceCode, input: any, version: any) => Promise<void>;
errorState: boolean;
gastEstimateTimeOut: any
constructor(
@ -39,7 +40,7 @@ export default class CodeParserCompiler {
init() {
this.onAstFinished = async (success, data: CompilationResult, source: CompilationSource, input: any, version) => {
this.onAstFinished = async (success, data: CompilationResult, source: CompilationSourceCode, input: any, version) => {
this.plugin.call('editor', 'clearAnnotations')
this.errorState = true
const result = new CompilerAbstract('soljson', data, source, input)
@ -104,7 +105,8 @@ export default class CodeParserCompiler {
this.plugin._buildIndex(data, source)
this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract)
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract as unknown as lastCompilationResult)
await this.plugin.gasService.showGasEstimates()
this.plugin.emit('astFinished')
}

@ -1,5 +1,6 @@
import { CodeParser, genericASTNode } from "../code-parser";
import { lineText } from '@remix-ui/editor'
import { lastCompilationResult } from '@remixproject/plugin-api';
export default class CodeParserGasService {
plugin: CodeParser
@ -40,7 +41,8 @@ export default class CodeParserGasService {
return
}
this.plugin.currentFile = await this.plugin.call('fileManager', 'file')
this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = await this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract)
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = await this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract as unknown as lastCompilationResult)
const gasEstimates = await this.getGasEstimates(this.plugin.currentFile)

@ -45,7 +45,13 @@ export default class CodeParserImports {
getDirectory = async (dir: string) => {
let result = []
const files = await this.plugin.call('fileManager', 'readdir', dir)
let files = {}
try {
if (await this.plugin.call('fileManager', 'exists', dir)) {
files = await this.plugin.call('fileManager', 'readdir', dir)
}
} catch (e) {}
const fileArray = this.normalize(files)
for (const fi of fileArray) {
if (fi) {

@ -34,31 +34,49 @@ enum State {
export class RemixdHandle extends WebsocketPlugin {
localhostProvider: any
appManager: PluginManager
constructor (localhostProvider, appManager) {
dependentPlugins: Array<string>
constructor(localhostProvider, appManager) {
super(profile)
this.localhostProvider = localhostProvider
this.appManager = appManager
this.dependentPlugins = ['hardhat', 'truffle', 'slither', 'foundry']
}
async deactivate () {
async deactivate() {
for (const plugin of this.dependentPlugins) {
if (await this.appManager.isActive(plugin)) {
await this.appManager.deactivatePlugin(plugin)
}
}
if (super.socket) super.deactivate()
// this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342
if (this.appManager.isActive('hardhat')) this.appManager.deactivatePlugin('hardhat')
if (this.appManager.isActive('truffle')) this.appManager.deactivatePlugin('truffle')
if (this.appManager.isActive('slither')) this.appManager.deactivatePlugin('slither')
if (this.appManager.isActive('foundry')) this.appManager.deactivatePlugin('foundry')
this.localhostProvider.close((error) => {
if (error) console.log(error)
})
}
async activate () {
async activate() {
this.connectToLocalhost()
return true
}
async canceled () {
async canceled() {
for (const plugin of this.dependentPlugins) {
if (await this.appManager.isActive(plugin)) {
await this.appManager.deactivatePlugin(plugin)
}
}
await this.appManager.deactivatePlugin('remixd')
}
async callPluginMethod(key: string, payload?: any[]) {
if (this.socket.readyState !== this.socket.OPEN) {
console.log(`${this.profile.name} connection is not opened.`)
return false
}
return super.callPluginMethod(key, payload)
}
/**
@ -67,11 +85,11 @@ export class RemixdHandle extends WebsocketPlugin {
*
* @param {String} txHash - hash of the transaction
*/
async connectToLocalhost () {
const connection = (error?:any) => {
async connectToLocalhost() {
const connection = async (error?: any) => {
if (error) {
console.log(error)
const alert:AlertModal = {
const alert: AlertModal = {
id: 'connectionAlert',
message: 'Cannot connect to the remixd daemon. Please make sure you have the remixd running in the background.'
}
@ -81,7 +99,7 @@ export class RemixdHandle extends WebsocketPlugin {
const intervalId = setInterval(() => {
if (!this.socket || (this.socket && this.socket.readyState === 3)) { // 3 means connection closed
clearInterval(intervalId)
const alert:AlertModal = {
const alert: AlertModal = {
id: 'connectionAlert',
message: 'Connection to remixd terminated. Please make sure remixd is still running in the background.'
}
@ -91,39 +109,38 @@ export class RemixdHandle extends WebsocketPlugin {
}, 3000)
this.localhostProvider.init(() => {
this.call('filePanel', 'setWorkspace', { name: LOCALHOST, isLocalhost: true }, true)
})
this.call('manager', 'activatePlugin', 'hardhat')
this.call('manager', 'activatePlugin', 'truffle')
this.call('manager', 'activatePlugin', 'slither')
this.call('manager', 'activatePlugin', 'foundry')
});
for (const plugin of this.dependentPlugins) {
await this.appManager.activatePlugin(plugin)
}
}
}
if (this.localhostProvider.isConnected()) {
this.deactivate()
} else if (!isElectron()) {
// warn the user only if he/she is in the browser context
const mod:AppModal = {
const mod: AppModal = {
id: 'remixdConnect',
title: 'Connect to localhost',
message: remixdDialog(),
okLabel: 'Connect',
cancelLabel: 'Cancel',
}
const result = await this.call('notification', 'modal', mod)
if(result) {
try {
this.localhostProvider.preInit()
super.activate()
setTimeout(() => {
if (!this.socket || (this.socket && this.socket.readyState === 3)) { // 3 means connection closed
connection(new Error('Connection with daemon failed.'))
} else {
connection()
}
}, 3000)
} catch (error) {
connection(error)
}
const result = await this.call('notification', 'modal', mod)
if (result) {
try {
this.localhostProvider.preInit()
super.activate()
setTimeout(() => {
if (!this.socket || (this.socket && this.socket.readyState === 3)) { // 3 means connection closed
connection(new Error('Connection with daemon failed.'))
} else {
connection()
}
}, 3000)
} catch (error) {
connection(error)
}
}
else {
await this.canceled()
@ -139,7 +156,7 @@ export class RemixdHandle extends WebsocketPlugin {
}
}
function remixdDialog () {
function remixdDialog() {
const commandText = 'remixd'
const fullCommandText = 'remixd -s <path-to-the-shared-folder> -u <remix-ide-instance-URL>'
return (<>
@ -152,13 +169,13 @@ function remixdDialog () {
</div>
<div className='mb-2 text-break'>
The remixd command is:
<br/><b>{commandText}</b>
<br /><b>{commandText}</b>
</div>
<div className='mb-2 text-break'>
The remixd command without options uses the terminal's current directory as the shared directory and the shared Remix domain can only be https://remix.ethereum.org, https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org
</div>
<div className='mb-2 text-break'>
Example command with flags: <br/>
Example command with flags: <br />
<b>{fullCommandText}</b>
</div>
<div className='mb-2 text-break'>

@ -51,11 +51,11 @@ export class CompileAndRun extends Plugin {
}
async runScript (fileName, clearAllInstances) {
await this.call('terminal', 'log', `running ${fileName} ...`)
await this.call('terminal', 'log', { value: `running ${fileName} ...`, type: 'info' })
try {
const exists = await this.call('fileManager', 'exists', fileName)
if (!exists) {
await this.call('terminal', 'log', `${fileName} does not exist.`)
await this.call('terminal', 'log', { value: `${fileName} does not exist.`, type: 'info' } )
return
}
const content = await this.call('fileManager', 'readFile', fileName)

@ -100,7 +100,7 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
this.renderComponent()
// @todo(#2875) should use loading compiler return value to check whether the compiler is loaded instead of "setInterval"
const value = JSON.stringify(settings, null, '\t')
this.call('notification', 'toast', compilerConfigChangedToastMsg(this.currentRequest.from, value))
}

@ -0,0 +1,75 @@
import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import { QueryParams } from '@remix-project/remix-lib'
import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry'
import enUS from './locales/en-US'
import zhCN from './locales/zh-CN'
const _paq = window._paq = window._paq || []
const locales = [
{ name: 'en-US', messages: enUS },
{ name: 'zh-CN', messages: zhCN },
]
const profile = {
name: 'locale',
events: ['localeChanged'],
methods: ['switchLocale', 'getLocales', 'currentLocale'],
version: packageJson.version,
kind: 'locale'
}
export class LocaleModule extends Plugin {
constructor () {
super(profile)
this.events = new EventEmitter()
this._deps = {
config: Registry.getInstance().get('config') && Registry.getInstance().get('config').api
}
this.locales = {}
locales.map((locale) => {
this.locales[locale.name.toLocaleLowerCase()] = locale
})
this._paq = _paq
let queryLocale = (new QueryParams()).get().locale
queryLocale = queryLocale && queryLocale.toLocaleLowerCase()
queryLocale = this.locales[queryLocale] ? queryLocale : null
let currentLocale = (this._deps.config && this._deps.config.get('settings/locale')) || null
currentLocale = currentLocale && currentLocale.toLocaleLowerCase()
currentLocale = this.locales[currentLocale] ? currentLocale : null
this.currentLocaleState = { queryLocale, currentLocale }
this.active = queryLocale || currentLocale || 'en-us'
this.forced = !!queryLocale
}
/** Return the active locale */
currentLocale () {
return this.locales[this.active]
}
/** Returns all locales as an array */
getLocales () {
return Object.keys(this.locales).map(key => this.locales[key])
}
/**
* Change the current locale
* @param {string} [localeName] - The name of the locale
*/
switchLocale (localeName) {
localeName = localeName && localeName.toLocaleLowerCase()
if (localeName && !Object.keys(this.locales).includes(localeName)) {
throw new Error(`Locale ${localeName} doesn't exist`)
}
const next = localeName || this.active // Name
if (next === this.active) return // --> exit out of this method
_paq.push(['trackEvent', 'localeModule', 'switchTo', next])
const nextLocale = this.locales[next] // Locale
if (!this.forced) this._deps.config.set('settings/locale', next)
if (localeName) this.active = localeName
this.emit('localeChanged', nextLocale)
this.events.emit('localeChanged', nextLocale)
}
}

@ -0,0 +1,196 @@
export default {
'panel.author': 'Author',
'panel.maintainedBy': 'Maintained By',
'panel.documentation': 'Documentation',
'panel.description': 'Description',
'settings.displayName': 'Settings',
'settings.reset': 'Reset to Default settings',
'settings.general': 'General settings',
'settings.generateContractMetadataText': 'Generate contract metadata. Generate a JSON file in the contract folder. Allows to specify library addresses the contract depends on. If nothing is specified, Remix deploys libraries automatically.',
'settings.ethereunVMText': 'Always use Javascript VM at load',
'settings.wordWrapText': 'Word wrap in editor',
'settings.useAutoCompleteText': 'Enable code completion in editor.',
'settings.useShowGasInEditorText': 'Display gas estimates in editor.',
'settings.displayErrorsText': 'Display errors in editor while typing.',
'settings.matomoAnalytics': 'Enable Matomo Analytics. We do not collect personally identifiable information (PII). The info is used to improve the site’s UX & UI. See more about ',
'settings.enablePersonalModeText': ' Enable Personal Mode for web3 provider. Transaction sent over Web3 will use the web3.personal API.\n',
'settings.warnText': 'Be sure the endpoint is opened before enabling it. \nThis mode allows a user to provide a passphrase in the Remix interface without having to unlock the account. Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...). Remix never persists any passphrase'.split('\n').map(s => s.trim()).join(' '),
'settings.gitAccessTokenTitle': 'GitHub Access Token',
'settings.gitAccessTokenText': 'Manage the access token used to publish to Gist and retrieve GitHub contents.',
'settings.gitAccessTokenText2': 'Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only \'create gist\' permission.',
'settings.etherscanTokenTitle': 'EtherScan Access Token',
'settings.etherscanAccessTokenText': 'Manage the api key used to interact with Etherscan.',
'settings.etherscanAccessTokenText2': 'Go to Etherscan api key page (link below) to create a new api key and save it in Remix.',
'settings.save': 'Save',
'settings.remove': 'Remove',
'settings.themes': 'Themes',
'settings.locales': 'Lanaguage',
'settings.swarm': 'Swarm Settings',
'settings.ipfs': 'IPFS Settings',
'filePanel.displayName': 'File explorer',
'filePanel.workspace': 'WORKSPACES',
'filePanel.create': 'Create',
'filePanel.clone': 'Clone',
'filePanel.download': 'Download',
'filePanel.restore': 'Restore',
'filePanel.workspace.create': 'Create Workspace',
'filePanel.workspace.rename': 'Rename Workspace',
'filePanel.workspace.delete': 'Delete Workspace',
'filePanel.workspace.deleteConfirm': 'Are you sure to delete the current workspace?',
'filePanel.workspace.name': 'Workspace name',
'filePanel.workspace.chooseTemplate': 'Choose a template',
'filePanel.workspace.download': 'Download Workspace',
'filePanel.workspace.restore': 'Restore Workspace Backup',
'filePanel.workspace.clone': 'Clone Git Repository',
'filePanel.workspace.enterGitUrl': 'Enter git repository url',
'filePanel.newFile': 'New File',
'filePanel.newFolder': 'New Folder',
'filePanel.rename': 'Rename',
'filePanel.delete': 'Delete',
'filePanel.deleteAll': 'Delete All',
'filePanel.run': 'Run',
'filePanel.pushChangesToGist': 'Push changes to gist',
'filePanel.publishFolderToGist': 'Publish folder to gist',
'filePanel.publishFileToGist': 'Publish file to gist',
'filePanel.copy': 'Copy',
'filePanel.paste': 'Paste',
'filePanel.compile': 'Compile',
'filePanel.compileForNahmii': 'Compile for Nahmii',
'filePanel.createNewFile': 'Create New File',
'filePanel.createNewFolder': 'Create New Folder',
'filePanel.publishToGist': 'Publish all the current workspace files to a github gist',
'filePanel.uploadFile': 'Load a local file into current workspace',
'filePanel.updateGist': 'Update the current [gist] explorer',
'home.scamAlert': 'Scam Alert',
'home.scamAlertText': 'The only URL Remix uses is remix.ethereum.org',
'home.scamAlertText2': 'Beware of online videos promoting "liquidity front runner bots"',
'home.scamAlertText3': 'Additional safety tips',
'home.learnMore': 'Learn more',
'home.here': 'here',
'home.featuredPlugins': 'Featured Plugins',
'home.files': 'Files',
'home.newFile': 'New File',
'home.openFile': 'Open File',
'home.connectToLocalhost': 'Connect to Localhost',
'home.loadFrom': 'LOAD FROM',
'home.resources': 'Resources',
'terminal.listen': 'listen on all transactions',
'terminal.search': 'Search with transaction hash or address',
'terminal.used': 'used',
'terminal.welcomeText1': 'Welcome to',
'terminal.welcomeText2': 'Your files are stored in',
'terminal.welcomeText3': 'You can use this terminal to',
'terminal.welcomeText4': 'Check transactions details and start debugging',
'terminal.welcomeText5': 'Execute JavaScript scripts',
'terminal.welcomeText6': 'Input a script directly in the command line interface',
'terminal.welcomeText7': 'Select a Javascript file in the file explorer and then run `remix.execute()` or `remix.exeCurrent()` in the command line interface',
'terminal.welcomeText8': 'Right click on a JavaScript file in the file explorer and then click `Run`',
'terminal.welcomeText9': 'The following libraries are accessible',
'terminal.welcomeText10': 'Type the library name to see available commands',
'debugger.displayName': 'Debugger',
'debugger.debuggerConfiguration': 'Debugger Configuration',
'debugger.stopDebugging': 'Stop debugging',
'debugger.startDebugging': 'Start debugging',
'debugger.placeholder': 'Transaction hash, should start with 0x',
'debugger.introduction': `When Debugging with a transaction hash,
if the contract is verified, Remix will try to fetch the source code from Sourcify or Etherscan. Put in your Etherscan API key in the Remix settings.
For supported networks, please see`,
'udapp.displayName': 'Deploy & run transactions',
'udapp.gasLimit': 'Gas limit',
'udapp.account': 'Account',
'udapp.value': 'Value',
'udapp.contract': 'Contract',
'udapp.signAMessage': 'Sign a message',
'udapp.enterAMessageToSign': 'Enter a message to sign',
'udapp.hash': 'hash',
'udapp.signature': 'signature',
'udapp.signedMessage': 'Signed Message',
'udapp.environment': 'Environment',
'udapp.environmentDocs': 'Click for docs about Environment',
'udapp.deploy': 'Deploy',
'udapp.publishTo': 'Publish to',
'udapp.or': 'or',
'udapp.atAddress': 'At Address',
'udapp.noCompiledContracts': 'No compiled contracts',
'udapp.loadContractFromAddress': 'Load contract from Address',
'udapp.deployedContracts': 'Deployed Contracts',
'udapp.deployAndRunClearInstances': 'Clear instances list and reset recorder',
'udapp.deployAndRunNoInstanceText': 'Currently you have no contract instances to interact with.',
'udapp.transactionsRecorded': 'Transactions recorded',
'search.displayName': 'Search in files',
'search.replace': 'Replace',
'search.replaceAll': 'Replace All',
'search.placeholder1': 'Search ( Enter to search )',
'search.placeholder2': 'Include ie *.sol ( Enter to include )',
'search.placeholder3': 'Exclude ie .git/**/* ( Enter to exclude )',
'search.matchCase': 'Match Case',
'search.matchWholeWord': 'Match Whole Word',
'search.useRegularExpression': 'Use Regular Expression',
'search.replaceWithoutConfirmation': 'replace without confirmation',
'search.filesToInclude': 'Files to include',
'search.filesToExclude': 'Files to exclude',
'solidity.displayName': 'Solidity compiler',
'solidity.compiler': 'Compiler',
'solidity.addACustomCompiler': 'Add a custom compiler',
'solidity.addACustomCompilerWithURL': 'Add a custom compiler with URL',
'solidity.includeNightlyBuilds': 'Include nightly builds',
'solidity.autoCompile': 'Auto compile',
'solidity.hideWarnings': 'Hide warnings',
'solidity.enableHardhat': 'Enable Hardhat Compilation',
'solidity.learnHardhat': 'Learn how to use Hardhat Compilation',
'solidity.enableTruffle': 'Enable Truffle Compilation',
'solidity.learnTruffle': 'Learn how to use Truffle Compilation',
'solidity.advancedConfigurations': 'Advanced Configurations',
'solidity.compilerConfiguration': 'Compiler configuration',
'solidity.compilationDetails': 'Compilation Details',
'solidity.language': 'Language',
'solidity.evmVersion': 'EVM Version',
'solidity.enableOptimization': 'Enable optimization',
'solidity.useConfigurationFile': 'Use configuration file',
'solidity.change': 'Change',
'solidity.compile': 'Compile',
'solidity.noFileSelected': 'no file selected',
'solidity.compileAndRunScript': 'Compile and Run script',
'solidity.publishOn': 'Publish on',
'solidity.Assembly': 'Assembly opcodes describing the contract including corresponding solidity source code',
'solidity.Opcodes': 'Assembly opcodes describing the contract',
'solidity.name': 'Name of the compiled contract',
'solidity.metadata': 'Contains all informations related to the compilation',
'solidity.bytecode': 'Bytecode being executed during contract creation',
'solidity.abi': 'ABI: describing all the functions (input/output params, scope, ...)',
'solidity.web3Deploy': 'Copy/paste this code to any JavaScript/Web3 console to deploy this contract',
'solidity.metadataHash': 'Hash representing all metadata information',
'solidity.functionHashes': 'List of declared function and their corresponding hash',
'solidity.gasEstimates': 'Gas estimation for each function call',
'solidity.Runtime Bytecode': 'Bytecode storing the state and being executed during normal contract call',
'solidity.swarmLocation': 'Swarm url where all metadata information can be found (contract needs to be published first)',
'pluginManager.displayName': 'Plugin manager',
'pluginManager.activate': 'Activate',
'pluginManager.deactivate': 'Deactivate',
'pluginManager.activeModules': 'Active Modules',
'pluginManager.inactiveModules': 'Inactive Modules',
'pluginManager.connectLocal': 'Connect to a Local Plugin',
'pluginManager.localForm.title': 'Local Plugin',
'pluginManager.localForm.pluginName': 'Plugin Name',
'pluginManager.localForm.shouldBeCamelCase': 'Should be camelCase',
'pluginManager.localForm.displayName': 'Display Name',
'pluginManager.localForm.nameInTheHeader': 'Name in the header',
'pluginManager.localForm.required': 'required',
'pluginManager.localForm.commaSeparatedMethod': 'comma separated list of method names',
'pluginManager.localForm.commaSeparatedPlugin': 'comma separated list of plugin names',
'pluginManager.localForm.pluginsItCanActivate': 'Plugins it can activate',
'pluginManager.localForm.typeOfConnection': 'Type of connection',
'pluginManager.localForm.locationInRemix': 'Location in remix',
'pluginManager.localForm.sidePanel': 'Side Panel',
'pluginManager.localForm.mainPanel': 'Main Panel',
'pluginManager.localForm.none': 'None',
}

@ -0,0 +1,196 @@
export default {
'panel.author': '作者',
'panel.maintainedBy': '维护者',
'panel.documentation': '文档',
'panel.description': '描述',
'settings.displayName': '设置',
'settings.reset': '恢复默认设置',
'settings.general': '常规设置',
'settings.generateContractMetadataText': '生成合约元数据. 在contract文件夹中生成JSON文件. 允许指定合约依赖的库地址. 如果未指定任何内容,Remix将自动部署库.',
'settings.ethereunVMText': '加载时始终使用以太坊虚拟机',
'settings.wordWrapText': '文本换行',
'settings.useAutoCompleteText': '在编辑器中启用代码自动补全.',
'settings.useShowGasInEditorText': '在编辑器中展示 gas 预算.',
'settings.displayErrorsText': '编辑代码时展示错误提示.',
'settings.matomoAnalytics': '启用 Matomo 分析. 我们不会收集个人身份信息 (PII). 收集的信息只会用于提升 UX & UI. 查看更多关于 ',
'settings.enablePersonalModeText': '为web3提供器启用私有模式. 通过Web3发送的交易将使用web3.personal API.\n',
'settings.warnText': '在启用之前请确认访问端结点已经开放. \n此模式允许在Remix界面中提供密码而无需解锁账号. 虽然这很方便,但你应当完全信任所连接的后端节点 (Geth, Parity, ...). Remix不会持久化保存任何密码.'.split('\n').map(s => s.trim()).join(' '),
'settings.gitAccessTokenTitle': 'Github 访问令牌',
'settings.gitAccessTokenText': '管理用于发布到 Gist 以及读取 Github 内容的 GitHub 访问令牌.',
'settings.gitAccessTokenText2': '前往 github (参见下方链接) 创建一个新的token,然后保存到Remix中. 确保这个token只有 \'create gist\' 权限.',
'settings.etherscanTokenTitle': 'EtherScan 访问 Token',
'settings.etherscanAccessTokenText': '管理用于与Etherscan交互的api密钥.',
'settings.etherscanAccessTokenText2': '前往 Etherscan api 密钥页面 (参见下方链接),创建一个新的api密钥并保存到Remix中.',
'settings.save': '保存',
'settings.remove': '删除',
'settings.themes': '主题',
'settings.locales': '语言',
'settings.swarm': 'Swarm 设置',
'settings.ipfs': 'IPFS 设置',
'filePanel.displayName': '文件浏览器',
'filePanel.workspace': '工作空间',
'filePanel.create': '新建',
'filePanel.clone': '克隆',
'filePanel.download': '下载',
'filePanel.restore': '恢复',
'filePanel.workspace.create': '新建工作空间',
'filePanel.workspace.rename': '重命名工作空间',
'filePanel.workspace.delete': '删除工作空间',
'filePanel.workspace.deleteConfirm': '确定要删除当前工作空间?',
'filePanel.workspace.name': '工作空间名称',
'filePanel.workspace.chooseTemplate': '选择一个工作空间模板',
'filePanel.workspace.download': '下载工作空间',
'filePanel.workspace.restore': '恢复工作空间',
'filePanel.workspace.clone': '克隆 Git 仓库',
'filePanel.workspace.enterGitUrl': '输入 Git 仓库地址',
'filePanel.newFile': '新建文件',
'filePanel.newFolder': '新建文件夹',
'filePanel.rename': '重命名',
'filePanel.delete': '删除',
'filePanel.deleteAll': '删除所有',
'filePanel.run': '运行',
'filePanel.pushChangesToGist': '将修改推送到gist',
'filePanel.publishFolderToGist': '将当前目录发布到gist',
'filePanel.publishFileToGist': '将当前文件发布到gist',
'filePanel.copy': '复制',
'filePanel.paste': '黏贴',
'filePanel.compile': '编译',
'filePanel.compileForNahmii': 'Nahmii编译',
'filePanel.createNewFile': '新建文件',
'filePanel.createNewFolder': '新建文件夹',
'filePanel.publishToGist': '将当前工作空间下所有文件发布到github gist',
'filePanel.uploadFile': '加载本地文件到当前工作空间',
'filePanel.updateGist': '更新当前 [gist] 浏览',
'home.scamAlert': '诈骗警报',
'home.scamAlertText': 'Remix 唯一使用的 URL 是 remix.ethereum.org',
'home.scamAlertText2': '注意那些宣传 "liquidity front runner bots" 的在线视频',
'home.scamAlertText3': '其他安全提示',
'home.learnMore': '了解更多',
'home.here': '这里',
'home.featuredPlugins': '精选插件',
'home.files': '文件',
'home.newFile': '新建文件',
'home.openFile': '打开本地文件',
'home.connectToLocalhost': '连接本地主机',
'home.loadFrom': '从以下来源导入',
'home.resources': '资源',
'terminal.listen': '监听所有交易',
'terminal.search': '按交易哈希或地址搜索',
'terminal.used': '已使用',
'terminal.welcomeText1': '欢迎使用',
'terminal.welcomeText2': '您的文件储存在',
'terminal.welcomeText3': '您可使用此终端',
'terminal.welcomeText4': '查看交易详情并启动调试',
'terminal.welcomeText5': '执行 JavaScript 脚本',
'terminal.welcomeText6': '直接在命令行界面输入脚本',
'terminal.welcomeText7': '在文件浏览器中选择一个 Javascript 文件,然后在命令行界面运行 `remix.execute()` 或 `remix.exeCurrent()` ',
'terminal.welcomeText8': '在文件浏览器中右键点击一个 JavaScript 文件,然后点击 `Run`',
'terminal.welcomeText9': '可以访问以下库',
'terminal.welcomeText10': '输入库名查看可用的指令',
'debugger.displayName': '调试器',
'debugger.debuggerConfiguration': '调试器配置',
'debugger.stopDebugging': '停止调试',
'debugger.startDebugging': '开始调试',
'debugger.placeholder': '交易哈希, 应该以 0x 开头',
'debugger.introduction': `当使用交易哈希调试时,
如果该合约已被验证, Remix 会试图从 Sourcify Etherscan 获取源码. Remix 中设置您的 Etherscan API key.
有关受支持的网络请参阅`,
'udapp.displayName': '部署 & 发交易',
'udapp.gasLimit': 'Gas 上限',
'udapp.account': '账户',
'udapp.value': '以太币数量',
'udapp.contract': '合约',
'udapp.signAMessage': '给一个消息签名',
'udapp.enterAMessageToSign': '输入一个需要签名的消息',
'udapp.hash': '哈希',
'udapp.signature': '签名',
'udapp.signedMessage': '已签名的消息',
'udapp.environment': '环境',
'udapp.environmentDocs': '点击查看环境文档',
'udapp.deploy': '部署',
'udapp.publishTo': '发布到',
'udapp.or': '或',
'udapp.atAddress': 'At Address',
'udapp.noCompiledContracts': '没有已编译的合约',
'udapp.loadContractFromAddress': '加载此地址的合约',
'udapp.deployedContracts': '已部署的合约',
'udapp.deployAndRunClearInstances': '清空合约实例并重置交易记录',
'udapp.deployAndRunNoInstanceText': '当前您没有可交互的合约实例.',
'udapp.transactionsRecorded': '已记录的交易',
'search.displayName': '全文搜索',
'search.replace': '替换',
'search.replaceAll': '替换所有',
'search.placeholder1': '搜索 ( 回车搜索 )',
'search.placeholder2': '包含 ie *.sol ( 回车包含 )',
'search.placeholder3': '排除 ie .git/**/* ( 回车排除 )',
'search.matchCase': '大小写匹配',
'search.matchWholeWord': '全字匹配',
'search.useRegularExpression': '使用正则表达式',
'search.replaceWithoutConfirmation': '替换无需确认',
'search.filesToInclude': '文件包含',
'search.filesToExclude': '文件排除',
'solidity.displayName': 'Solidity 编译器',
'solidity.compiler': '编译器',
'solidity.addACustomCompiler': '添加一个自定义编译器',
'solidity.addACustomCompilerWithURL': '通过URL添加一个自定义编译器',
'solidity.includeNightlyBuilds': '包含每日构造版本',
'solidity.autoCompile': '自动编译',
'solidity.hideWarnings': '隐藏警告',
'solidity.enableHardhat': '启用 Hardhat 编译',
'solidity.learnHardhat': '学习怎么使用 Hardhat 编译',
'solidity.enableTruffle': '启用 Truffle 编译',
'solidity.learnTruffle': '学习怎么使用 Truffle 编译',
'solidity.advancedConfigurations': '高级配置',
'solidity.compilerConfiguration': '编译器配置',
'solidity.compilationDetails': '编译详情',
'solidity.language': '语言',
'solidity.evmVersion': 'EVM 版本',
'solidity.enableOptimization': '启用优化',
'solidity.useConfigurationFile': '使用配置文件',
'solidity.change': '修改',
'solidity.compile': '编译',
'solidity.noFileSelected': '未选中文件',
'solidity.compileAndRunScript': '编译且执行脚本',
'solidity.publishOn': '发布到',
'solidity.Assembly': '合约的汇编操作码,包含对应的solidity源程序',
'solidity.Opcodes': '合约的汇编操作码',
'solidity.name': '已编译合约的名称',
'solidity.metadata': '包含编译相关的全部信息',
'solidity.bytecode': '合约创建时执行的字节码',
'solidity.abi': 'ABI: 全部合约函数的描述 (输入/输出 参数, 作用域, ...)',
'solidity.web3Deploy': '拷贝/粘贴这部分代码到任何 JavaScript/Web3 控制台都可以部署此合约',
'solidity.metadataHash': '元数据的哈希值',
'solidity.functionHashes': '合约定义的函数清单,包含对应的哈希',
'solidity.gasEstimates': '每个函数调用的Gas估算值',
'solidity.Runtime Bytecode': '用于保存状态并在合约调用期执行的字节码',
'solidity.swarmLocation': '可以找到所有元数据信息的Swarm url (首先需要发布合约) ',
'pluginManager.displayName': '插件管理',
'pluginManager.activate': '启用',
'pluginManager.deactivate': '停用',
'pluginManager.activeModules': '启用的模块',
'pluginManager.inactiveModules': '停用的模块',
'pluginManager.connectLocal': '连接本地插件',
'pluginManager.localForm.title': '本地插件',
'pluginManager.localForm.pluginName': '插件名称',
'pluginManager.localForm.shouldBeCamelCase': '应当采用驼峰命名法',
'pluginManager.localForm.displayName': '展示名称',
'pluginManager.localForm.nameInTheHeader': '标题中展示的名称',
'pluginManager.localForm.required': '必填',
'pluginManager.localForm.commaSeparatedMethod': '英文逗号分隔方法名称',
'pluginManager.localForm.commaSeparatedPlugin': '英文逗号分隔插件名称',
'pluginManager.localForm.pluginsItCanActivate': '能激活该插件的插件',
'pluginManager.localForm.typeOfConnection': '连接类型',
'pluginManager.localForm.locationInRemix': '在Remix中的位置',
'pluginManager.localForm.sidePanel': '侧面板',
'pluginManager.localForm.mainPanel': '主面板',
'pluginManager.localForm.none': '无',
}

@ -21,8 +21,8 @@ export class SearchPlugin extends ViewPlugin {
constructor () {
super(profile)
}
render() {
render() {
return (
<div id='searchTab'>
<SearchTab plugin={this}></SearchTab>
@ -30,4 +30,4 @@ export class SearchPlugin extends ViewPlugin {
);
}
}
}

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
@ -23,8 +24,8 @@ module.exports = class SettingsTab extends ViewPlugin {
config: any = {}
editor: any
private _deps: {
themeModule: any // eslint-disable-line
themeModule: any
localeModule: any
}
element: HTMLDivElement
public useMatomoAnalytics: any
@ -37,7 +38,8 @@ module.exports = class SettingsTab extends ViewPlugin {
})
this.editor = editor
this._deps = {
themeModule: Registry.getInstance().get('themeModule').api
themeModule: Registry.getInstance().get('themeModule').api,
localeModule: Registry.getInstance().get('localeModule').api
}
this.element = document.createElement('div')
this.element.setAttribute('id', 'settingsTab')
@ -49,7 +51,7 @@ module.exports = class SettingsTab extends ViewPlugin {
this.renderComponent()
}
render() {
render() {
return <div id='settingsTab'>
<PluginViewWrapper plugin={this} />
</div>
@ -62,6 +64,7 @@ module.exports = class SettingsTab extends ViewPlugin {
_deps={state._deps}
useMatomoAnalytics={state.useMatomoAnalytics}
themeModule = {state._deps.themeModule}
localeModule={state._deps.localeModule}
/>
}
@ -80,4 +83,4 @@ module.exports = class SettingsTab extends ViewPlugin {
...this
})
}
}
}

@ -32,7 +32,7 @@ export class Web3ProviderModule extends Plugin {
if (error) {
const errorData = error.data ? error.data : error.message ? error.message : error
// See: https://github.com/ethers-io/ethers.js/issues/901
if (!(typeof errorData === 'string' && errorData.includes("unknown method eth_chainId"))) this.call('terminal', 'log', error.data ? error.data : error.message)
if (!(typeof errorData === 'string' && errorData.includes("unknown method eth_chainId"))) this.call('terminal', 'log', { value: error.data ? error.data : error.message, type: 'error' } )
return reject(errorData)
}
if (payload.method === 'eth_sendTransaction') {

@ -69,7 +69,7 @@ export class RunTab extends ViewPlugin {
this.emit('clearAllInstancesReducer')
}
addInstance (address, abi, name) {
addInstance (address, abi, name) {
this.emit('addInstanceReducer', address, abi, name)
}
@ -78,7 +78,7 @@ export class RunTab extends ViewPlugin {
}
sendTransaction (tx) {
_paq.push(['trackEvent', 'udapp', 'sendTx'])
_paq.push(['trackEvent', 'udapp', 'sendTx', 'udappTransaction'])
return this.blockchain.sendTransaction(tx)
}
@ -95,7 +95,7 @@ export class RunTab extends ViewPlugin {
}
onReady (api) {
this.REACT_API = api
this.REACT_API = api
}
async onInitDone () {
@ -174,7 +174,7 @@ export class RunTab extends ViewPlugin {
}
}
})
await this.call('blockchain', 'addProvider', {
name: 'Optimism Provider',
isInjected: true,

@ -10,7 +10,7 @@ const profile = {
methods: [],
events: [],
description: 'Remix home tab ',
icon: 'assets/img/remixLogo.webp',
icon: 'assets/img/home.webp',
location: 'mainPanel',
version: packageJson.version
}
@ -30,9 +30,8 @@ export class LandingPage extends ViewPlugin {
}
render () {
return <div id='landingPageHomeContainer' className='remixui_homeContainer justify-content-between bg-light d-flex' data-id='landingPageHomeContainer'><RemixUiHomeTab
plugin={this}
/></div>
}
return <div id='landingPageHomeContainer' className='remixui_homeContainer justify-content-between bg-light d-flex' data-id='landingPageHomeContainer'>
<RemixUiHomeTab plugin={this} />
</div>
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="165" height="165" viewBox="0 0 165 165" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M91.993 45C83.181 45 76 37.8204 76 28.9921C76 20.1779 83.181 13 91.993 13C100.821 13 108 20.1779 108 28.9921C108 37.8204 100.821 45 91.993 45M82.5 0C36.9366 0 0 36.937 0 82.4991C0 101.872 6.69319 119.672 17.8711 133.749C26.8781 121.109 36.4975 109.188 48.5698 99.2582C48.9162 98.9725 49.7499 98.3619 50.8086 97.5906C55.8308 93.8271 59.3497 88.3158 60.3048 82.1153V82.0117C63.3559 61.898 71.6113 54.9655 94.5527 54.9655C96.5862 54.9655 98.7608 55.0262 101.039 55.1262C112.774 55.6761 119.546 59.0325 120.338 60.7804C120.786 61.7373 120.767 62.7746 120.563 63.769L119.647 63.6476C112.408 62.7532 101.242 64.9706 99.6963 72.86C98.8233 77.3555 99.8605 82.2974 100.285 86.8321C100.734 91.5098 101.141 96.2284 101.101 100.947C101.08 101.313 100.816 103.143 101.06 103.345C88.5737 91.3883 59.6942 106.396 50.6033 112.986C51.5406 112.68 52.4761 112.334 53.4117 111.989C62.0741 109.04 88.3898 101.149 98.5376 109.874C107.139 120.409 99.3928 139.852 92.987 149.491C89.1486 155.288 84.5549 160.374 79.456 164.923C80.4683 164.961 81.4788 165 82.5 165C128.063 165 165 128.065 165 82.4991C165 36.937 128.063 0 82.5 0" fill="#000000"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save