NEAR Protocol CompilationError

202 views Asked by At

Hello Guys I got a CompilationError at Near (@ Macbook M1 Chip Terminal) I called the helloWorld function but I got that error. Does anyone have an idea why? Thanks in advance for help :)

near call dev-1649760447277-15731695561522 helloWorld --accountId kadirg.testnet
Scheduling a call: dev-1649760447277-15731695561522.helloWorld()
Doing account.functionCall()

Failure [dev-1649760447277-15731695561522]: Error: Cannot find contract code for account dev-1649760447277-15731695561522

type: 'CodeDoesNotExist'
2

There are 2 answers

1
Juan Peña On BEST ANSWER

checking in:

Stats Gallery - Contract

and:

NEAR Testnet

This account has no contract deployed. So this is not a "Compilation Error", maybe you didn't compiled and for sure you didn't deploy it.

You need to compile it with:

$ yarn build:release
$ asb

and then deploy with:

$ near dev-deploy ../build/release/simple.wasm

You can follow this guide: First contract AS

1
lalmazari On

Can you check function name helloWorld is correct in index.ts file.