GithubHelp home page GithubHelp logo

superblockshq / ethereum-studio Goto Github PK

View Code? Open in Web Editor NEW
185.0 17.0 102.0 21.62 MB

Official Ethereum Studio project repository. And IDE specially tailored to make it as simple as possible to onboard new users into the Ethereum ecosystem

Home Page: https://ethereum.org/build/

License: GNU General Public License v3.0

Dockerfile 0.07% JavaScript 25.36% Shell 0.21% HTML 1.04% CSS 12.84% TypeScript 59.10% Solidity 1.38%
ethereum ide solidity solidity-contracts ethereum-studio superblocks ethereum-ide editor onboarding

ethereum-studio's People

Contributors

abcoathup avatar bashlund avatar chrischinchilla avatar donfrigo avatar filippsen avatar futurejones avatar javier-tarazaga avatar lovrobiljeskovic avatar nathan-lapinski avatar ostap1010 avatar pfedan avatar rsbondi avatar samajammin avatar spejbl avatar waheed25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethereum-studio's Issues

Unhandled error in interact panel

Environment/Browser

Local/Firefox

Description

When calling a method from interact panel which sends a transaction and ends up with error crashes whole application.

Steps to reproduce

  1. Open CryptoPizza, Compile/Deploy to browser
  2. Open Interact panel
  3. Call approve function with no parameters
  4. Application crashes with TypeError: row.msg.split is not a function

Expected result

Error should show up in Output console instead crashing the app

Actual result

App crash

Reproducible

100%

Unable to Deploy to Custom network

Steps to reproduce

  1. Change to Custom network from Select a Network button
  2. Edit the Default account (from Select an Account button)
  3. In Configure Account, press Unlock
  4. Enter a valid seed
  5. Compile
  6. Deploy

Observed output

OutputPanel/<
webpack-internal:///./src/components/projectEditor/panels/output/OutputPanel.tsx:83:5
OutputPanel
src/components/projectEditor/panels/output/OutputPanel.tsx:50:29

  47 |             cl = style.std3;
  48 |         } else if (row.channel === 4) {
  49 |             cl = style.std4;
> 50 |         }
     |         ^  51 |         return <div key={index + lineIndex} className={cl}>{line}</div>;
  52 |     });
  53 | })}

Other errors

Output panel reads:

Could not get nonce for address 0xd4d1e0bcb5060745a3b14f8419b26a95bac343a2.

Browser console output:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8545/. (Reason: CORS request did not succeed).

(ES-20)

Download button in TopBar not working unless Preview window is opened

Environment/Browser

Live/Firefox

Description

I guess title is self explanatory.

Steps to reproduce

  1. Open any project and keep the Preview window open
  2. Try clicking on Download Project action from TopBar's left corner dropdown
  3. It should open up modal
  4. Now try to close the Preview window and repeat step 2
  5. Download Project action is not working in this condition

Expected result

Have the download button disabled or fix it to work even without preview window

Actual result

As described.
Silent failure.

Reproducible

100%

Moving Contract file to different folder results in contract arguments lost

Environment/Browser

Live/Firefox

Description

When moving a Contract which has setup constructor arguments, for example the Hello World template, it loses those arguments upon moving contract to different folder.

Steps to reproduce

  1. Open Hello World template
  2. Open Configure modal and check that there is 1 argument with value Hello World!
  3. Try to move the Contract inside file system to the root folder by dragging it
  4. Check Configure modal once again and there are 0 arguments now

Expected result

Contract should preserve arguments upon moving this file

Actual result

Contract loses all contract args upon moving it to different folder

Reproducible

100%

Make the Select Template modal more appealing

Summary

Add content to the “Pick a template” modal that appears when entering the application, to make it more of a “Welcome! Here is some basic information” popup.

  • A link to a video tutorial (https://adobe.ly/32bZ3sv)
  • Add 1-2 sentences, something like: “Ethereum Studio is a tool for developers who want to learn about building on Ethereum. The templates below will teach you how to write a smart contract, deploy it to Ethereum, and interact with the contracts through a web-based application”

Motivation

We want a more welcoming first impression.

Note

This is different from the start with a template flow, which we can leave is it is.

Disable Web3 Accounts button in Preview Settings won't do anything

Environment/Browser

Live environment

Description

Disable Web3 Accounts apparently doesn't do anything about the accounts. Checkbox won't toggle.

Steps to reproduce

  1. From Hello World template
  2. From the Select a Network button, set the network to Ropsten
  3. Compile
  4. Deploy (confirm the transaction and wait for it to succeed)
  5. Confirm the Hello World message appears in the Preview window
  6. In the Preview window, click the Settings button (top right corner)
  7. Press the Disable Web3 Accounts checkbox

Expected result

Expected the checkbox to tick and the access to the account to be disabled with the red message appended to the app: There was an error communicating with the contract (as it used to be in Lab).

Actual result

Clicking the Disable Web3 Accounts button refreshes the Preview window with no other apparent changes.

Enable back external networks

Summary

Enable back ability to list and select from external and custom networks both from Select a Network and Select an Account (Edit), removed in request #101.

Fix "Support Ethereum Studio" popup

Environment/Browser

All

Description

The popup is confusing.

  • no diff in colour vs template popup makes it feel broken / unclear
  • change "Support Ethereum Studio" to "Enable anonymous tracking?”

Steps to reproduce

  1. Open Studio in incognito to see the popup

Expected result

Something which looks less confusing, since it overlaps the create new project popup.

Actual result

I get the impression something is broken

Reproducible

Yes

Couple of issues with Payable function in Interact panel

Environment/Browser

Firefox / Local / Browser network

Description

There are multiple issues, probably related, so I've put it into one issue.

Issues

1. Payable function doesn't allow for parameters
Consider this following function. function payme(string memory name) payable public {...} Interact panel doesn't show correct input for such function, there are missing parameters and when calling it, Error: Invalid number of arguments to Solidity function appears.

See #122

  1. Payable function doesn't show ether value in transactions
    All other issues can be reproduced with this function
uint _amount = 0;
function payme() payable public {
   _amount += msg.value;
}

Calling this function from Interact with some value should show Value: <value> Ether in transactions panel

  1. Calling with nonnumerical value for example Patata succeed in transactions, even though I would expect it to fail or not go through at all

4. It's hard to say in which units is the value - There could be some placeholder inside the input to make it easier for users, to say it's in wei units for example
See #122

  1. Input allows for negative numbers, not sure if this is correct behavior

  2. Calling it with high number for example 99999999 prints out in console Error: Number can only safely store up to 53 bits and adds transactions as pending, which never gets updated (related to #88)

Reproducible

100%

Fetching nonce for a pristine account returns 0, which is erroneously translated as an error.

Environment/Browser

Chromium

Description

In the Superprovider there is a function to fetch the nonce of the selected account.
If this is a new account the nonce is 0, and that is interpreted as an error since the if statement is vague.

const nonce = await this.getNonce(this.selectedEnvironment.endpoint, this.selectedAccount.address)
    .catch((err) => console.log(err));
    if (!nonce) {
        alert('The nonce could not be fetched');
        return;
    }

Steps to reproduce

  1. Deploy a CryptoPizza template
  2. Deploy using Default account
  3. Switch to new pristine account
  4. Create a new pizza
  5. See the error alert popup.

Expected result

Nonce for pristine accounts are 0 and that should not be interpreted as an error.

Actual result

For pristine accounts the application fails posting a transaction from preview.

Reproducible

Yes, if using the fixed features where the correct account is set in the preview (#86)

Cross-Origin Request Blocked warning messages when set to any external network

Browser

Firefox

Description

When set to any external network, undeployed or deployed contract results into infinite set of Cross-Origin Request Blocked messages.

Steps to reproduce

  1. From Hello World template
  2. Set network to Ropsten

Expected result

No warnings.

Actual result

After switching to external network, the following warning message shows in browser console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://ropsten.infura.io/v3/[...]. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

This is not strictly related to undeployed contracts or the Preview window.

Flicker when opening an already opened file, ES-66

Description

When editing a file and clicking on the name of the file tab quickly, there is a small flicker, where the state is reloaded.

Steps to reproduce

  1. Edit any file
  2. Click quickly on the name of the tab
  3. Observe the flicker

Expected result

No flicker

Actual result

Flicker

Reproducible

100%

Open Studio text is not properly centered

Environment/Browser

Latest master.

Unable to reproduce on Firefox.
Happens on Chrome and Opera.

Description

The Open Studio button, which only appears in embedded mode, looks misaligned.

Steps to reproduce

  1. Run locally
  2. From any project, click Share
  3. Copy the Embed code
  4. Create a new file iframe.html and paste in the Embed code
  5. Browse to local iframe.html file

Expected result

Text alignment.

Actual result

"Open Studio" text is slighted shifted to the bottom
openstudiotext

Configure Account returns could not get balance for unlocked custom accounts

Potentially only happens in Live environment

Description
Configure Account returns "could not get balance from custom account", even when network is set to Custom.

Steps to reproduce
Requires a local Ethereum node running at localhost:8545 and a given wallet mnemonic.

  1. Click the Select a Network button
  2. Edit the Default account
  3. Select custom
  4. Click Unlock
  5. Paste in the wallet mnemonic and confirm with OK

Observed output
Browser console output returns:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8545/. (Reason: CORS request did not succeed).2

Firefox version 69.0.3

(ES-19)

Contract configured with construct argument type of account won't Deploy

Environment/Browser

Live environment

Description

Contract deployment configured to take construct argument type of "account" (address), won't succeed.

Steps to reproduce

  1. From Hello World
  2. Change HelloWorld.sol to:
pragma solidity ^0.5.10;
contract HelloWorld {
    address public message;
    constructor(address initMessage) public {
        message = initMessage;
    }
}
  1. Go to Configure
  2. Change argument type from value to account, then Save
  3. Compile
  4. Deploy

Expected result

Expected the contract to successfully deploy and render the template Preview correctly.

Actual result

From the Output window:

Transaction mined, verifying code...
Contract code could not be verified on chain. The contract might not have been deployed.
This is possibly a mismatch in the number/type of arguments given to the constructor or could
also be a temporary issue in reading back the contract code from the chain.

Unable to Interact with overloaded functions

Environment/Browser

Local/Firefox

Description

Consider having those 2 functions:

function test(string memory _a) public pure returns(string memory) {
    return _a;
}

function test(string memory _a, uint _b) public pure returns(string memory, uint) {
    return (_a, _b);
}

Trying to interact with the first one inside Interact panel doesn't work as the Epic (code) thinks you just called the second one. And throws Error: Invalid number of arguments to Solidity function

Complete error message in Output panel:

There was an issue getting the value: Error: Invalid number of arguments to Solidity function

Steps to reproduce

  1. Open this project or create your own with provided functions
    Edit Project
  2. Compile
  3. Deploy it to browser
  4. Open Interact panel
  5. Calling the 2 parameters function with patata, 5 will succeed
  6. Calling the 1 parameter function with patata will fail with the error mentioned

Expected result

Both functions should succeed

Actual result

Just one of the overloaded functions work

Reproducible

100%

The Superprovider is always fed with the previously selected account

Environment/Browser

Chromium

Description

When working with the preview and changing accounts, the preview/dapp/superprovider always get setAccount() for the previously selected account.

Steps to reproduce

  1. Create Hello World dapp
  2. Output accounts in the dapp (window.web3.eth.accounts and this.web3.eth.getAccounts( function (err, res) {console.log("getAccounts", res)});)
  3. Create new accounts
  4. Switch between accounts
  5. Observe how the accessible account is always the previously selected account.

Expected result

To get the currently selected account.

Actual result

Always get the previously selected account.

Reproducable

Yes

Invalid number of arguments error after Deploy

Environment/Browser

Live environment

Description

Calls from Interact panel used to crash the application. Then, reading back from arrays was not possible in _Interact.

Deploy results in Invalid number of arguments error.

Steps to reproduce

  1. From Hello World template
  2. Change HelloWorld.sol to:
pragma solidity ^0.5.10;
contract HelloWorld {
    uint256[] public message;
    constructor(uint256[] memory initMessage) public {
        message = initMessage;
    }
}
  1. Go to Configure
  2. Change argument type from value to array
  3. Set array argument value to 1,2,3, then Save.
  4. Compile
  5. Deploy

Expected result

No errors.

Actual result

Browser console returns:

Error: Invalid number of arguments to Solidity function web3.min.js:1

Note: Even though the "Actual result" is similar to #42, this is being flagged a separate issue as its known to be a distinct type, which could be taking a different route.

Incorrect gas cost in Transaction History

Environment/Browser

Live environment

Description

Incorrect gas cost readings in Transaction History details.

Steps to reproduce

  1. From Hello World template
  2. Compile
  3. Deploy
  4. Press the Transactions button (right side panel)
  5. Locate the deployment and click Show more

Expected result

Given Gas used 254007 and Gas Price set to 1 GWei, expected Gas cost to read 0.000254007 Ether instead.

Actual result

Given Gas used 254007 and Gas Price set to 1 GWei, Gas cost reads 254007 Ether.

Configure Account reads locked for unlocked accounts after reopening the settings the first time

Description
Configure Account settings show locked status after having unlocked the account on a previous occasion.

Steps to reproduce

  1. From Hello World template project
  2. Change to Custom network (from Select a Network)
  3. Access the Default account from the Select an Account button
  4. Click the Edit Account button (pencil icon)
  5. Confirm custom network is selected from the left side list
  6. Press Unlock button
  7. Enter a valid seed, then press OK
  8. Close the Configure Account modal
  9. Re-open the Configure Account by accessing the Edit Account button again

Observed output
When reopening the Configure Account settings, it reads as if the account wasn't unlocked:

This wallet is locked. Unlock the wallet to show the address and the balance.
From inside the same Configure Account screen, switching to a different network (e.g. "browser"), then back to "custom" makes the information display correctly (Address and Balance).

(ES-61)

Unable to rename account

Environment/Browser

Live

Description

When trying to update name of the account, it doesn't update the state in the dropdown, and when trying to rename the "renamed" account again, it crashes application. Although it does correctly update in dappfile.sjon

Steps to reproduce

  1. Create a New Account from topbar dropdown (Select an Account)
  2. Try to rename newly created Account1 to Patata
  3. Observe that it didn't update the name of the account
  4. Try to rename the Account1 once again to Patata
  5. Whole application crashes with TypeError: dappFileAccount is undefined

Expected result

Account should be renamed

Actual result

Account doesn't get renamed and it crashes application if trying to rename it again.

Live environment, browser console output returns:

TypeError: i is undefined updateAccountName.epic.ts:59:12

Reproducible

100%

Deploy action silently fails when compilation fails or hasn't been invoked yet

Description
When compilation fails or hasn't been invoked yet, Deploy action silently fails (apparently doesn’t do anything).

Deploy does not trigger "Compile and Deploy".

Related / impacts: https://help.superblocks.com/en/articles/3195307-deploying-smart-contracts

Steps to reproduce

  1. Create a new project (or delete the build directory of an existing project)
  2. Press Deploy action either from the Explorer hierarchy or from the editor top bar

Observed behavior
No feedback or output shown in Output or Messages windows, nor in the browser console.

(ES-3)

Browser network doesn't catch failed transactions from interact panel

Environment/Browser

Local/Firefox

Description

When some transaction is supposed to fail, it gets stuck in pending state instead or doesn't get added at all in case of deployment

Steps to reproduce

  1. Open CryptoPizza and Compile/Deploy to browser network
  2. Open Interact panel from left side
  3. Find burn method and add some nonexistent id of pizza ex. 14
  4. Clicking on the yellow Burn button will create a new transaction, but it gets stuck in pending state

Expected result

Transaction should fail because the id of Pizza doesn't exist

Actual result

Transaction remains pending indefinitely

Reproducible

100%

The Superprovider should return `getAccounts` as vanilla Metamask web3 does it.

Environment/Browser

Chromium, Opera

Description

The Superprovider should return getAccounts as vanilla Metamask web3 does it.

Steps to reproduce

  1. Perform eth_accounts from within dapp preview.
  2. Then do it from browser console, circumventing the Superprovider.

Expected result

One account, not all internal EVM accounts.

Actual result

All EVM accounts.

Reproducible

Yes

Unable to save project which is too large

Environment/Browser

Production/Firefox-Chrome

Description

When the project is too big, the server doesn't handle the request so it's unable to save such project.

Steps to reproduce

  1. Create CryptoPizza project
  2. Compile and Deploy to browser network (this step is important so the build folder gets big enough)
  3. Try to modify any file and hit save button
  4. Browser's console logs out 500 - Internal server error

image (1)
{message: request entity too large}

Expected result

Should save the project

Actual result

Doesn't save

Reproducible

100%

OG image preview caching issue

Environment/Browser

N/A

Description

Seems Telegram (& potentiall other platforms) have cached the preview image:
Image 2019-11-04 at 8 44 35 AM

We should change the filename & reference.

Steps to reproduce

Share https://studio.ethereum.org/

Expected result

Should display new image

Actual result

Displays old image

Reproducible

100% (at least in Telegram)

Deploy action against external network without having MetaMask enabled causes the application to crash

Triggering Deploy action against external network without having MetaMask enabled causes the application to crash:

react-dom.production.min.js:4483 TypeError: e.msg.split is not a function
    at OutputPanel.tsx:42
    at Array.map (<anonymous>)
    at OutputPanel.tsx:41
    at na (react-dom.production.min.js:3550)
    at Ba (react-dom.production.min.js:4050)
    at Js (react-dom.production.min.js:6548)
    at gu (react-dom.production.min.js:5531)
    at bu (react-dom.production.min.js:5520)
    at iu (react-dom.production.min.js:5252)
    at react-dom.production.min.js:2775
(anonymous) @ react-dom.production.min.js:1657
14:23:43.622 hostReportError.js:4 Uncaught TypeError: e.msg.split is not a function
    at OutputPanel.tsx:42
    at Array.map (<anonymous>)
    at OutputPanel.tsx:41
    at na (react-dom.production.min.js:3550)
    at Ba (react-dom.production.min.js:4050)
    at Js (react-dom.production.min.js:6548)
    at gu (react-dom.production.min.js:5531)
    at bu (react-dom.production.min.js:5520)
    at iu (react-dom.production.min.js:5252)
    at react-dom.production.min.js:2775

(ES-27)

Copy and paste bug when dealing with the editor

Initially reported as follows:

  1. Select Template -> Hello World
  2. Press Create Project
  3. Select any text from README
  4. Copy the contents with Ctrl/Cmd+C
  5. Select any line inside the same README file
  6. (try to) Paste the contents with Ctrl/Cmd+V

More details in request #23

Display previews of markdown files

Summary

Display markdown files in preview mode instead of the raw markdown.

Motivation

Currently the app displays the raw markdown file, which makes for poor UX: it's hard to read & requires lots of horizontal scrolling:
Image 2019-10-23 at 9 13 27 AM

It'd be great to display a preview of the markdown file instead, e.g. like how WebAssembly Studio does it:
Image 2019-10-23 at 9 14 38 AM

WebAssembly Studio is also open source:
https://github.com/wasdk/WebAssemblyStudio
Looks like they also use the Monaco Editor & they mention "Showdown is used to automatically preview .md files."

Describe alternatives you've considered

None.

Additional context

Transactions performed by Interact are not listed on Transactions History

Environment/Browser

Live environment

Description

Transactions issued from the Interact screen do not show up in the Transactions panel.

Steps to reproduce

  1. Load any project
  2. Compile
  3. Succesfully Deploy
  4. Go to Interact (left side panel)
  5. Perform any transaction e.g. update from the Hello World template

Expected result

Expected the transaction to appear on the Transactions History list.

Actual result

Nothing. Apparently only deployments are listed.

Allow all robots

Summary

Update robots.txt to allow all
https://www.robotstxt.org/orig.html#format

Motivation

Why are we doing this? What use cases does it support? What is the expected outcome?

We now want search engines & social networks to crawl & index the site.

Current setup:
Image 2019-11-04 at 10 36 33 AM

Describe alternatives you've considered

A clear and concise description of the alternative solutions you've considered.

Additional context

Incorrect Gas Price in Transactions History

Environment/Browser

Live environment

Description

Incorrect Gas Price reading in Transaction History details.

Steps to reproduce

  1. From Hello World template
  2. Compile
  3. Deploy
  4. Press the Transactions button (right side panel)
  5. Locate the deployment and click Show more

Expected result

Default Gas Price is known to be set to 1 GWei.

Actual result

Gas Price reads: 1000000000 GWei.

Unable to call Solidity function with no parameters from Interact panel

Environment/Browser

Live

Description

When calling a function from Interact panel which doesn't have any parameters results in error Error: Invalid number of arguments to Solidity function

Example function:

function renounceOwnership() public onlyOwner {
     emit OwnershipTransferred(_owner, address(0));
     _owner = address(0);
}

Steps to reproduce

Note: #90 needs to be merged before reproducing this, because it would crash application otherwise merged already

  1. Open this project (Voting system) https://studio.ethereum.org/5dc258f65e562d0012e7007e
    Edit Project
  2. Compile and Deploy Vote.sol Contract to browser network
  3. Open Interact panel and try to call renounceOwnership function with the yellow button

Expected result

Function should succeed with a new transaction

Actual result

Error: Invalid number of arguments to Solidity function gets print out

Reproducible

100%

Type Error when trying to Deploy to custom network causes application to crash

Steps to Reproduce

  1. From Hello World template
  2. Compile
  3. Deploy
  4. Change network from Browser to Custom
  5. Deploy

Observed output

TypeError: "e.msg is undefined"
    Pt OutputPanel.tsx:42
    Pt OutputPanel.tsx:41
    React 7
    unstable_runWithPriority scheduler.production.min.js:266
    React 5
react-dom.production.min.js:4483
TypeError: e.msg is undefinedOutputPanel.tsx:42:24

(ES-17)

Errors setting up local development

Environment/Browser

Latest master on MacOS

Description

This API request fails when I try to create a new project in my local development:
http://localhost:4002/v1/projects/5d9453375634771a056d25d5
See console error below. I suspect I'm missing the API service, there's nothing running on that port.

Perhaps the README instructions are outdated? I see there's a Dockerfile. I tried building & running that up but also hit issues.

Steps to reproduce

  1. Fork & cd into repo https://github.com/SuperblocksHQ/ethereum-studio/
  2. Follow quick start instructions (npx lerna bootstrap --hoist & npm start)
  3. In browser (localhost:4000), click on "create project"

Expected result

Create a project

Actual result

Nothing, console error:

GET http://localhost:4002/v1/projects/5d9453375634771a056d25d5 net::ERR_CONNECTION_REFUSED
fetchJSON @ fetchJson.ts:49
getProjectById @ project.service.ts:39
eval @ createProjectFromTemplate.epic.ts:30
SwitchMapSubscriber._next @ switchMap.js:56
Subscriber.next @ Subscriber.js:68
WithLatestFromSubscriber._next @ withLatestFrom.js:88
Subscriber.next @ Subscriber.js:68
FilterSubscriber._next @ filter.js:50
Subscriber.next @ Subscriber.js:68
Notification.observe @ Notification.js:27
ObserveOnSubscriber.dispatch @ observeOn.js:56
AsyncAction._execute @ AsyncAction.js:84
QueueAction.execute @ QueueAction.js:34
AsyncScheduler.flush @ AsyncScheduler.js:53
QueueAction.schedule @ QueueAction.js:29
Scheduler.schedule @ Scheduler.js:18
AsyncScheduler.schedule @ AsyncScheduler.js:37
ObserveOnSubscriber.scheduleMessage @ observeOn.js:62
ObserveOnSubscriber._next @ observeOn.js:66
Subscriber.next @ Subscriber.js:68
Subject.next @ Subject.js:64
AnonymousSubject.next @ Subject.js:166
eval @ createEpicMiddleware.js:54
eval @ index.js:11
createProjectFromTemplate @ index.ts:32
ProjectTemplateModal._this.onCreateProjectHandle @ ProjectTemplateModal.tsx:55
callCallback @ react-dom.development.js:363
invokeGuardedCallbackDev @ react-dom.development.js:412
invokeGuardedCallback @ react-dom.development.js:465
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:480
executeDispatch @ react-dom.development.js:613
executeDispatchesInOrder @ react-dom.development.js:638
executeDispatchesAndRelease @ react-dom.development.js:743
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:752
forEachAccumulated @ react-dom.development.js:724
runEventsInBatch @ react-dom.development.js:769
runExtractedPluginEventsInBatch @ react-dom.development.js:915
handleTopLevel @ react-dom.development.js:5887
batchedEventUpdates$1 @ react-dom.development.js:24340
batchedEventUpdates @ react-dom.development.js:1460
dispatchEventForPluginEventSystem @ react-dom.development.js:5987
attemptToDispatchEvent @ react-dom.development.js:6104
dispatchEvent @ react-dom.development.js:6007
unstable_runWithPriority @ scheduler.development.js:820
runWithPriority$2 @ react-dom.development.js:12280
discreteUpdates$1 @ react-dom.development.js:24357
discreteUpdates @ react-dom.development.js:1485
dispatchDiscreteEvent @ react-dom.development.js:5970
Show 18 more frames
createProjectFromTemplate.epic.ts:45 There was an issue loading the project: TypeError: Failed to fetch

Reproducible

100% in my local env

Different way of forking the project for embedded Studio

Summary

Currently when you open a project that you don't own and initiate any action which modifies project files, it will fork the project and redirects you to a newly created project. This might be an expected and correct behavior, but might be "annoying" if the Studio is embedded inside documentation and users try to play around. It will fork/reload the iframe with the first action the users takes.

Actions that will fork the project: Compilation, Deployment, Adding a new account, Configuring contract, Modifying file, Moving/Renaming/Deleting file, Renaming Project

Motivation

Better UX for embedded Studio

Describe alternatives you've considered

One way to solve this would be to add something like CodeSandbox does to embedded iframes.
Screenshot from 2019-10-30 18-40-10

In our case it would fork the project on clicking the iframe. This is up for discussion though if somebody can come with better idea.

Race condition while compiling project which user doesn't own

Environment/Browser

Chrome/Firefox - local environment

Description

When user tries to compile a project which they doesn't own, sometimes it doesn't properly fork (create) a new project and fails on api call.

Steps to reproduce

  1. Create a new project in incognito mode (any browser)
  2. Copy paste the url of the project and open it up in normal mode
  3. Try to compile project (left button in menu)
  4. Compilation will either create a new project (redirects to a new id) or it will silently fail with PUT - 500 error code in console. (There is possibly some race condition somewhere)

Expected result

Compilation should redirect user to his own new forked project.

Actual result

Step 4.1

Reproducible

50%

Calls from Interact silently fail

Environment/Browser

Live

Description

Calls from Interact panel do not return any data, apparently due to unhandled invalid response.

Steps to reproduce

From Hello World template

  1. Change network to Ropsten (from Select a Network button)
  2. Compile
  3. Deploy (confirming the transaction and waiting for it to succeed)
  4. Go to Interact (left side panel)
  5. Expand HelloWorld item
  6. Click message button

From Coin template

  1. Compile
  2. Deploy
  3. Open Interact (left side panel)
  4. Expand Coin item
  5. Press the green balances button

Expected result

Expected the returned value to appear on the right side of the green (call) button.

Actual result

Browser console output reads:

Hello World

Error: "Invalid JSON RPC response: """
getConstant.epic.ts:30
There was an issue getting the value: Problem calling to get the message

Coin

getConstant.epic.ts:65
There was an issue getting the value: Error: Invalid number of arguments to Solidity function

Update README to reference studio.ethereum.org

Summary

Update README image & URL references to reflect that this project now lives at ethereum.org

Motivation

Clarity

Describe alternatives you've considered

None

Additional context

Interact panel doesn't work for external network

Environment/Browser

Firefox/local master 7fa651a

Description

It's not possible to interact with contract deployed to external network (Rinkeby/Ropsten)

Steps to reproduce

  1. Create any project
  2. Switch to Rinkeby account
  3. Compile and deploy contract
  4. Wait for successful deployment
  5. Open Interact panel (left menu)
  6. Toggle the contract item and it reads "Contract is not found on current network. Please deploy it first."

Looks like it was broken in this commit d6c9804
EDIT: It doesn't work only in Firefox and probably in Safari (didn't test that one). It works fine in Chrome. There are probably related issues similar to this one. The problem is that when calling methods of web3 as sendTransaction, and getBalance on Firefox, it throws error Invalid JSON RPC response.

Expected result

Same functionality as in browser network

Actual result

Not functional

Reproducible

100%

Account balance for non-empty custom account reads 0 after unlocking

Description
Account balance for Custom account does not update after unlock.

Steps to reproduce

  1. From Hello World template project
  2. Change to Custom network (from Select a Network button)
  3. Access the Default account from the Select an Account button
  4. Click the Edit Account button (pencil icon)
  5. Confirm custom network is selected from the left side list
  6. Press Unlock button
  7. Enter a valid seed, then press OK
  8. Close the Configure Account modal

Observed output
Account balance reads:

Account balance: 0

Changing networks (Select a Network button) apparently forces the status bar to refresh.

(ES-62)

Could not get nonce for address error: multiple Compile actions reset internal network and/or account state

Steps to reproduce

  1. From Hello World project
  2. Select Ropsten
  3. Compile
  4. Compile again
  5. Deploy

Observed output

Using Solidity compiler version 0.5.10
Success in compilation
Using Solidity compiler version 0.5.10
Success in compilation
Could not get nonce for address 0xa48f2e0be8ab5a04a5eb1f86ead1923f03a207fd.

0xa48f2e0be8ab5a04a5eb1f86ead1923f03a207fd is an addresses used by the Browser network.

(ES-59)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.