luvitale / truffle-ts-starter

A starter for truffle with typescript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeChain x Truffle v5 Example

Running

# it will automatically run TypeChain types generation
yarn

# Run `yarn generate-types` to manually regenerate them

# run tests
truffle test

# migrations are kinda tricky (look at known limitation section) - we need to transpile ts to js file (this is not a case for tests)
yarn migrate

Known limitations

Migrations need to be transpiled to js before execution. Use yarn migrate instead of truffle migrate to transpile and migrate with a single command.

Command for Verifying Smart Contract Source Code

After deployment, run the following command with one or more contracts that you wish to verify:

truffle run verify SomeContractName AnotherContractName --network networkName

You can optionally provide an explicit address of the contract(s) that you wish to verify. This may be useful when you have deployed multiple instances of the same contract. The address is appended with @

as follows:

truffle run verify ContractName@0x61C9157A9EfCaf6022243fA65Ef4666ECc9FD3D7 --network rinkeby

More details can be found here.

About

A starter for truffle with typescript.

License:MIT License


Languages

Language:JavaScript 46.8%Language:TypeScript 32.0%Language:Solidity 19.3%Language:Shell 1.9%