Skip to content

Commit

Permalink
feat: add ContractView using contract-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 27, 2023
1 parent 2e607c7 commit 5590f25
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 38 deletions.
244 changes: 242 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"vue-router": "^4.1.6"
},
"devDependencies": {
"@aeternity/contract-builder": "^0.1.0",
"@babel/core": "^7.21.3",
"@babel/eslint-parser": "^7.21.3",
"@vue/cli-plugin-babel": "~5.0.8",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1>Welcome To Aeternity</h1>
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
<router-link to="/contract">Contract</router-link>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const routes = [
component: Home
},
{
path: '/about',
name: 'About',
path: '/contract',
name: 'Contract',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// this generates a separate chunk (contract.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
component: () => import(/* webpackChunkName: "contract" */ '../views/ContractView.vue')
}
]

Expand Down
2 changes: 0 additions & 2 deletions src/utils/aeternity/contracts/Idenitity.aes

This file was deleted.

4 changes: 4 additions & 0 deletions src/utils/aeternity/contracts/Multiplier.aes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract Multiplier =
record state = { factor: int }
entrypoint init(f : int) : state = { factor = f }
entrypoint calc(x : int) = x * state.factor
14 changes: 0 additions & 14 deletions src/views/AboutView.vue

This file was deleted.

Loading

0 comments on commit 5590f25

Please sign in to comment.