vechain / vechain-sdk-js

The official JavaScript SDK for VeChain.
24 stars 9 forks source link

feat: adding comment field in clauses #984

Closed Valazan closed 3 months ago

Valazan commented 3 months ago

This PR adds support for the comment field when transacting with the contract module:

await contract.transact.transfer(
    { comment: 'Transferring 100 ERC20 tokens' },
    '0x9e7911de289c3c856ce7f421034f66b6cde49c39',
    unitsUtils.parseUnits('100', decimals[0] as bigint)
);

Or when building clauses:

const clauseSet1 = loadedContract.clause.set(
            {
                comment: 'set the value in the contract to 123'
            },
            123n
        );
github-actions[bot] commented 3 months ago

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (3425/3425) 100% (805/805) 100% (708/708)
Title Tests Skipped Failures Errors Time
core 498 0 :zzz: 0 :x: 0 :fire: 1m 5s :stopwatch:
network 660 0 :zzz: 0 :x: 0 :fire: 4m 8s :stopwatch:
errors 48 0 :zzz: 0 :x: 0 :fire: 11.073s :stopwatch: