Skip to content

Commit

Permalink
Merge pull request #31 from effectai/ptokens_update
Browse files Browse the repository at this point in the history
Ptokens_update
  • Loading branch information
jeisses committed May 13, 2023
2 parents a1ea9d6 + b7a9383 commit 48ce1cc
Show file tree
Hide file tree
Showing 11 changed files with 3,194 additions and 1,672 deletions.
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ NUXT_ENV_TOKEN_CONTRACT=effecttokens
NUXT_ENV_BSC=BSC
NUXT_ENV_EOS=EOS
NUXT_ENV_BLOCKCHAIN_NETWORK=mainnet
NUXT_ENV_PTOKEN=EFX
NUXT_ENV_PTOKEN_SYMBOL=EFX
NUXT_ENV_PTOKEN_NETWORK='https://pnetwork-node-2a.eu.ngrok.io/'

NUXT_ENV_BSC_NETWORK=mainnet
NUXT_ENV_BSC_NETWORK_ID=56
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.20.0
32 changes: 32 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "client: chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"webpack:///*": "${workspaceRoot}/*"
}
},
{
"type": "node",
"request": "launch",
"name": "server: nuxt",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev:debug"],
"sourceMaps": true,
"smartStep": true,
"console": "integratedTerminal",
"internalConsoleOptions": "openOnFirstSessionStart"
}
],
"compounds": [
{
"name": "fullstack: nuxt",
"configurations": ["server: nuxt", "client: chrome"]
}
]
}
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

➡️ <b><a href="https://discord.gg/hM3237cYXP">Join the Effect DAO Discord!</a></b>


Vue dApp to interact with the Defi services of Effect network.
Vue dApp to interact with the Defi services of Effect network.
This dApp bridges the EOS blockchain and the Binance Smart Chain.
Currently built in to this Vue dApp is the bridge, to swap tokens and an interface to interact with the Pancakeswap EFX farm.

Currently built in to this Vue dApp is the bridge, to swap tokens and an interface to interact with the Pancakeswap EFX farm.

## Build Setup
In order to run this repo, clone it, install the dependencies, build it, and start it.

In order to run this repo, clone it, install the dependencies, build it, and start it.

```bash
git clone https://github.com/effectai/bridge-frontend

Expand All @@ -29,11 +29,11 @@ npm run generate
npm run start
```

If everything went correctly, the server should be running now and now you can navigate to http://localhost:3000 and see the Vue app running.

If everything went correctly, the server should be running now and now you can navigate to <http://localhost:3000> and see the Vue app running.

## Development
For active development it is recomended to use `npm run dev`. The command will serve with hot reload at localhost:3000. Heads up, this will load in the `developement` environment variables.

For active development it is recomended to use `npm run dev`. The command will serve with hot reload at localhost:3000. Heads up, this will load in the `developement` environment variables.

```bash
git clone https://github.com/effectai/bridge-frontend
Expand All @@ -44,17 +44,21 @@ npm run dev
```

## Node-sass Node version
The `node-sass` package is very picky with which Node version it will work with.
You can use use [NVM](https://github.com/nvm-sh/nvm) to set node version to the corresponding supported version.

The `node-sass` package is very picky with which Node version it will work with.
You can use use [NVM](https://github.com/nvm-sh/nvm) to set node version to the corresponding supported version.
Check out the repo of `node-sass` to see which [Node version](https://github.com/sass/node-sass#node-version-support-policy
) is needed.

## Contribution

Please look at our [contribution guide](https://github.com/effectai/effect-network/blob/master/.github/CONTRIBUTING.md) in order to start submitting PR.

## Code of Conduct

You can take a look at our code of conduct here: [CODE OF
CONDUCT](https://github.com/effectai/effect-network/blob/master/.github/CODE_OF_CONDUCT.md)

## Effect Network
Learn more about Effect Network here: https://github.com/effectai/effect-network

Learn more about Effect Network here: <https://github.com/effectai/effect-network>
8 changes: 5 additions & 3 deletions components/SwapForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,21 @@ export default {
this.efxAmount = null
},
async onSwap() {
this.$ptokens.init(this.$bsc.currentProvider)
await this.$ptokens.init(this.$bsc)
this.$router.push('/swap-progress')
if (this.swapFromEOS) {
try {
await this.$ptokens.swapToBsc(this.efxAmount)
await this.$ptokens.swapEosToBsc(this.efxAmount)
} catch (e) {
console.error('swap ptokes.swapEosToBsc() error', e)
this.swapError = e.message
}
} else {
try {
await this.$ptokens.swapToEos(this.efxAmount)
await this.$ptokens.swapBscToEos(this.efxAmount)
} catch (e) {
console.error('swap ptokes.swapBscToEos() error', e)
this.swapError = e.message
}
}
Expand Down
5 changes: 5 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export default {
loaders: {
scss: {
additionalData: "@import '~assets/scss/variables.scss';"
},
extend(config, { isClient }) {
if (process.env.NODE_ENV !== 'production') {
config.devtool = isClient ? 'source-map' : 'inline-source-map'
}
}
}
},
Expand Down

0 comments on commit 48ce1cc

Please sign in to comment.