Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
19 changes: 19 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# bookswap

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
15 changes: 15 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
//["es2015", { "modules": false }]
],
plugins: [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
13,552 changes: 13,552 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/package-lock.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "swap",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@drizzle/store": "^1.5.3",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"echarts": "^5.1.0",
"element-ui": "^2.15.1",
"node-sass": "^4.14.1",
"qs": "^6.10.1",
"sass-loader": "^8.0.2",
"style-resources-loader": "^1.4.1",
"vue": "^2.6.11",
"vue-i18n": "^8.24.3",
"vue-router": "^3.2.0",
"vuex": "^3.4.0",
"web3": "^1.3.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-plugin-component": "^1.1.1",
"vue-cli-plugin-style-resources-loader": "^0.1.5",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file not shown.
25 changes: 25 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<style>
html,body{width: 100%;height: 100%;min-width: 320px;
font-family: PingFangSC-Semibold, PingFang SC;}
*{margin: 0;padding: 0;}
#app{
width: 100%;height:100%;
}
</style>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
38 changes: 38 additions & 0 deletions projects/Team-17-BoboSwap/boboswap-polygon/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
import Web3 from "web3";
import { Drizzle } from "@drizzle/store";
import drizzleOptions from "./assets/contracts/drizzleOptions";
import { myMixins } from "./assets/js/Wallet/ConnectWallet";
export default {
data() {
return {
web3: null,
};
},
mixins: [myMixins],
async created() {
const drizzle = new Drizzle(drizzleOptions);
this.$store.dispatch("setDrizzle", drizzle);
await this.connectWallet();
this.$store.dispatch("getHangQing");
setInterval(() => {
this.$store.dispatch("getTradeInfo");
}, 15000);
},
methods: {},
components: {},
};
</script>


<style lang="scss">
@import "./assets/styles/base.scss";
#app {
font-family: "Playfair Display SC";
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
{
"contractName": "BoboToken",
"networks": {},
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
Loading