Skip to content

[feature request] chain-as-promise support #82

Open
@hychen

Description

Given a smart contract, say erc20,

When a contract developer wants to check a transaction returns any error, He could check if any promise rejection happened.

Expect that he could do as below:

import { Error } from artificats.erc20;
const contractFactory = await getContractFactory('erc20', creator);
const contract = await contractFactory.deploy('new', 100);
expect(() => await contract.transfer(signer.address))
    .rejectWith(Error.InsufficientAllowance);

Dependencies

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions