()
+
+ const changeLanguage = async (lang: string) => {
+ await plugin.call('locale', 'switchLocale', lang)
+ }
+
+ useEffect(() => {
+ plugin.call('locale', 'currentLocale').then(opt => {
+ setLangOptions(opt.code.toUpperCase())
+ })
+ }, [langOptions])
+
+ useEffect(() => {
+ plugin.on('locale', 'localeChanged', (lang: localeLang) => {
+ setLangOptions(lang.code.toUpperCase())
+ })
+ }, [langOptions])
+
+ return (
+ <>
+
+
+ {['EN', 'ES', 'FR', 'ZH'].map(lang => (
+
+ {
+ changeLanguage(lang.toLowerCase())
+ setLangOptions(lang)
+ }}
+ >
+ {lang}
+
+ ))}
+
+
+ >
+ )
+}
diff --git a/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts b/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts
index 128815d979..1e922f7a83 100644
--- a/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts
+++ b/libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts
@@ -114,3 +114,10 @@ export default class Carousel extends React.Component {
direction: Direction;
containerRef: React.RefObject;
}
+
+export type localeLang = {
+ code: string
+ localeName: string
+ messages: { [key: string]: string }
+ name: string
+}
diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
index a6f3257675..116e724ab6 100644
--- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
+++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
@@ -11,6 +11,7 @@ import HomeTabFeatured from './components/homeTabFeatured'
import HomeTabFeaturedPlugins from './components/homeTabFeaturedPlugins'
import isElectron from 'is-electron'
import { HomeTabFileElectron } from './components/homeTabFileElectron'
+import { LanguageOptions } from './components/homeTablangOptions'
declare global {
interface Window {
@@ -64,6 +65,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
+
diff --git a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts
index 83a75a3085..08d3e10af4 100644
--- a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts
+++ b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts
@@ -119,8 +119,10 @@ const getConfirmationCb = (plugin: RunTab, dispatch: React.Dispatch, confir
export const continueHandler = (dispatch: React.Dispatch, gasEstimationPrompt: (msg: string) => JSX.Element, error, continueTxExecution, cancelCb) => {
if (error) {
- const msg = typeof error !== 'string' ? error.message : error
-
+ let msg = typeof error !== 'string' ? error.message : error
+
+ if (msg.includes('invalid opcode')) msg += '\n OR the EVM version used by the selected environment is not compatible with the compiler EVM version.'
+
dispatch(displayNotification('Gas estimation failed', gasEstimationPrompt(msg), 'Send Transaction', 'Cancel Transaction', () => {
continueTxExecution()
}, () => {
diff --git a/libs/remix-ws-templates/src/templates/playground/contracts/helloWorld.sol b/libs/remix-ws-templates/src/templates/playground/contracts/HelloWorld.sol
similarity index 77%
rename from libs/remix-ws-templates/src/templates/playground/contracts/helloWorld.sol
rename to libs/remix-ws-templates/src/templates/playground/contracts/HelloWorld.sol
index 47fabd793a..9ad0641975 100644
--- a/libs/remix-ws-templates/src/templates/playground/contracts/helloWorld.sol
+++ b/libs/remix-ws-templates/src/templates/playground/contracts/HelloWorld.sol
@@ -2,7 +2,10 @@
pragma solidity >=0.6.12 <0.9.0;
contract HelloWorld {
+ /**
+ * @dev Prints Hello World string
+ */
function print() public pure returns (string memory) {
return "Hello World!";
}
-}
\ No newline at end of file
+}
diff --git a/libs/remix-ws-templates/src/templates/playground/index.ts b/libs/remix-ws-templates/src/templates/playground/index.ts
index 52e33a5a43..f5e1638484 100644
--- a/libs/remix-ws-templates/src/templates/playground/index.ts
+++ b/libs/remix-ws-templates/src/templates/playground/index.ts
@@ -1,7 +1,7 @@
export default async () => {
return {
// @ts-ignore
- 'contracts/helloWorld.sol': (await import('raw-loader!./contracts/helloWorld.sol')).default,
+ 'contracts/HelloWorld.sol': (await import('raw-loader!./contracts/HelloWorld.sol')).default,
// @ts-ignore
'scripts/deploy_with_ethers.ts': (await import('!!raw-loader!./scripts/deploy_with_ethers.ts')).default,
// @ts-ignore
diff --git a/team-best-practices.md b/team-best-practices.md
index a05714dc5d..d9b4b8baec 100644
--- a/team-best-practices.md
+++ b/team-best-practices.md
@@ -20,10 +20,7 @@ Related links:
- Remix-debug NPM module: https://www.npmjs.com/package/@remix-project/remix-debug
- Remix-tests NPM module: https://www.npmjs.com/package/@remix-project/remix-tests
- Remix documentation: http://remix-ide.readthedocs.io/en/latest/
- - General gitter channel: https://gitter.im/ethereum/remix
- - Dev gitter channel: https://gitter.im/ethereum/remix-dev
- - Dev plugin gitter channel: https://gitter.im/ethereum/remix-dev-plugin
-
+ - Discord: https://discord.gg/mh9hFCKkEq
---
@@ -187,4 +184,4 @@ Before starting coding, we should ensure all devs / contributors are aware of:
# Coding best practices
- - https://github.com/ethereum/remix-project/blob/master/best-practices.md
+ - https://github.com/ethereum/remix-project/blob/master/CONTRIBUTING.md