How to use the @taquito/utils.encodeExpr function in @taquito/utils

To help you get started, we’ve selected a few @taquito/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ecadlabs / taquito / packages / taquito / src / contract / rpc-contract-provider.ts View on Github external
async getBigMapKeyByID(id: string, keyToEncode: string, schema: Schema): Promise {
    const { key, type } = schema.EncodeBigMapKey(keyToEncode);
    const { packed } = await this.context.rpc.packData({ data: key, type });

    const encodedExpr = encodeExpr(packed);

    const bigMapValue = await this.context.rpc.getBigMapExpr(id.toString(), encodedExpr);

    return schema.ExecuteOnBigMapValue(bigMapValue, smartContractAbstractionSemantic(this)) as T;
  }
github ecadlabs / taquito / packages / taquito / src / contract / rpc-contract-provider.ts View on Github external
async getBigMapKeyByID(id: string, keyToEncode: string, schema: Schema): Promise {
    const { key, type } = schema.EncodeBigMapKey(keyToEncode);
    const { packed } = await this.context.rpc.packData({ data: key, type });

    const encodedExpr = encodeExpr(packed);

    const bigMapValue = await this.context.rpc.getBigMapExpr(id.toString(), encodedExpr);

    return schema.ExecuteOnBigMapValue(bigMapValue, smartContractAbstractionSemantic(this)) as T;
  }