token-contract
token-contract copied to clipboard
minterController.ts: api.getContractState is not a function
- Clone the repo
-
npm install
-
npx blueprint run
->minterController
- The file couldn't be compiled with the error:
TypeError: api.getContractState is not a function
The same problem in the ui-utils.ts
file.
Same problem ! Any solution for this error ?
Same problem! Any solution for this type error?
looks like this repo is died
i guess i found solution
- force cast TonClient | TonClient4 to TonClient4
- get seqno of latest block const seqno = (await api.getLastBlock()).last.seqno;
- use TonClient4 instance to obtain contract state const contractState = (await api.getAccount(seqno, minterAddress)).account.state;
getting cell from contract state code: const stateCode = Cell.fromBase64(contractState.code!);