near-runtime-ts
near-runtime-ts copied to clipboard
Typescript library for writing near smart contracts
Adding `//@nearfile out` does not create the out folder, so you get the error: `[10:24:14] Error: ENOENT: no such file or directory, open 'out/assembly/main.ts` Expected: No error
`Collections` no longer has any collections below it, they are exported on the same level as `Collections`
We should update the readme to look like the nearcore repo. Low priority, but putting here for tracking so I'll remember it.
The following function in `Vector`: ```ts /** * @returns The length of the vector. */ get length(): i32 { if (this._length < 0) { this._length = storage.get(this._lengthKey, 0); } return...
Using `u128` prevents compilation, example code: ```ts import {storage} from './near'; import {u128} from './bignum'; export function init(): void { storage.set('Hello', 1); } ``` This fails to compile with error:...
If I have the following code: ```ts import {storage} from 'near-runtime-ts/near'; export function init(): void { storage.set('Hello', 1); const x = storage.get('Hello'); assert(x > 10); } ``` I get the...
Observe the following model: ```TypeScript export class Tiger { name: string; } ``` If I want to store multiple lists of `tigers` in a persistent way, it makes sense to...
Looking at `collections.Vector` there is no way to return the values in the vector to the outside world. In order to return the whole vector from the contract, I have...
As @vgrichina mentioned in the comments of #16, we should enable local testing using https://github.com/jtenner/as-pect.
Some scratch options for the new API: ``` import {ContractPromise} from "../../../../code/metanear-src/out/near"; export function getWeather(location): Weather { return new Weather("shitty"); } export function getWeather(location): void { ContractPromise.create(bjklbdsklnsbklnb, ,asdf/ asdf).returnAsResult(); }...