|
|
|
@ -139,7 +139,19 @@ function HomeTabFile({ plugin }: HomeTabFileProps) { |
|
|
|
|
} |
|
|
|
|
await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false }) |
|
|
|
|
await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false }) // calling once is not working.
|
|
|
|
|
await plugin.call('fileManager', 'open', '/contracts/helloWorld.sol') |
|
|
|
|
const content = `// SPDX-License-Identifier: MIT
|
|
|
|
|
pragma solidity >=0.6.12 <0.9.0; |
|
|
|
|
|
|
|
|
|
contract HelloWorld { |
|
|
|
|
function print() public pure returns (string memory) { |
|
|
|
|
return "Hello World!"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
` |
|
|
|
|
const { newPath } = await plugin.call('fileManager', 'writeFileNoRewrite', '/contracts/helloWorld.sol', content) |
|
|
|
|
await plugin.call('fileManager', 'open', newPath) |
|
|
|
|
|
|
|
|
|
//await plugin.call('fileManager', 'open', '/contracts/helloWorld.sol')
|
|
|
|
|
} |
|
|
|
|
const uploadFile = async (target) => { |
|
|
|
|
_paq.push(['trackEvent', 'hometab', 'filesSection', 'uploadFile']) |
|
|
|
|