You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✔ Build project
✔ Generate build.json
✔ Choose smart contract
The 'TokenFunding' smart contract will be used
for this deploy alias as specified in config.json.
✔ Generate verification key (takes 10-30 sec)
Using the cached verification key
✖ Build transaction
TypeError: Cannot read properties of undefined (reading 'x')
TypeError: Cannot read properties of undefined (reading 'x')
at PublicKey.toFields (o1js/dist/node/lib/provable/types/circuit-value.js:39:48)
at Object.set (o1js/dist/node/lib/mina/state.js:110:58)
at TokenFunding.deploy (file:///E:/Project/JsProj/Zk/ZkAA/build/src/task5/tokenfunding.js:67:23)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async file:///C:/Users/nostalgia/AppData/Roaming/fnm/node-versions/v23.3.0/installation/node_modules/zkapp-cli/src/lib/deploy.js:353:9
at async file:///E:/Project/JsProj/Zk/ZkAA/node_modules/o1js/dist/node/lib/mina/transaction.js:71:17
at async generateWitness (o1js/dist/node/lib/provable/core/provable-context.js:47:9)
at async Object.runUnchecked (o1js/dist/node/lib/provable/provable.js:162:9)
at async createTransaction (o1js/dist/node/lib/mina/transaction.js:70:13)
at async file:///E:/Project/JsProj/Zk/ZkAA/node_modules/o1js/dist/node/lib/mina/mina.js:208:26
at async file:///C:/Users/nostalgia/AppData/Roaming/fnm/node-versions/v23.3.0/installation/node_modules/zkapp-cli/src/lib/deploy.js:347:14
at async step (file:///C:/Users/nostalgia/AppData/Roaming/fnm/node-versions/v23.3.0/installation/node_modules/zkapp-cli/src/lib/helpers.js:60:20)
at async deploy (file:///C:/Users/nostalgia/AppData/Roaming/fnm/node-versions/v23.3.0/installation/node_modules/zkapp-cli/src/lib/deploy.js:346:21)
at async Object.handler (file:///C:/Users/nostalgia/AppData/Roaming/fnm/node-versions/v23.3.0/installation/node_modules/zkapp-cli/src/bin/index.js:135:30)
Test:
> zkaa@0.1.0 test
> node --experimental-vm-modules node_modules/jest/bin/jest.js tokenfunding.test.ts
(node:24568) ExperimentalWarning: CommonJS module E:\Project\JsProj\Zk\ZkAA\node_modules\jest-util\build\requireOrImportModule.js is loading ES Module E:\Project\JsProj\Zk\ZkAA\jest.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:24568) ExperimentalWarning: VM Modules is an experimental feature and might change at any time
(node:24568) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
FAIL src/test/tokenfunding.test.ts
● Test suite failed to run
Argument 1 of method approveBase is not a provable type: function Function() { [native code] }
1 | import { method, TokenContract, UInt64, type AccountUpdateForest, type DeployArgs, Permissions } from "o1js";
2 |
> 3 | const SUPPLY = UInt64.from(10n ** 12n);
| ^
4 | export class MyTokenContract extends TokenContract {
5 | @method async approveBase(forest: AccountUpdateForest) {
6 | this.checkZeroBalanceChange(forest);
at node_modules/o1js/src/lib/proof-system/zkprogram.ts:603:11
at Array.map (<anonymous>)
at sortMethodArguments (node_modules/o1js/src/lib/proof-system/zkprogram.ts:600:53)
at method (node_modules/o1js/src/lib/mina/zkapp.ts:133:29)
at DecorateProperty (node_modules/reflect-metadata/Reflect.js:553:33)
at Reflect.decorate (node_modules/reflect-metadata/Reflect.js:123:24)
at __decorate (src/task5/token.ts:3:92)
at src/task5/token.ts:5:16
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.707 s
Ran all test suites matching /tokenfunding.test.ts/i.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Deploy:
Test:
Here the Token:
Beta Was this translation helpful? Give feedback.
All reactions