Example implementation of EIP-6358

Prerequisites

Installation

npm install

Add the configuration file truffle-config.js into the directory ./. The file truffle-config.js can be generated by executing the command in an $empty directory$:

npx truffle init

Note that:

After truffle-config.js is generated, then:

development: {
     host: "127.0.0.1",     // Localhost (default: none)
     port: 8545,            // Standard Ethereum port (default: none)
     network_id: "*",       // Any network (default: none)
    },

Compilation

touch .secret
npx truffle compile

Unit test

Launch local testnet

npx ganache -s 0

Test

Open another terminate

npx truffle test