pendulum-chain / wasm-deploy

A tool to deploy an ensemble of wasm smart contracts to Pendulum
GNU General Public License v3.0
2 stars 1 forks source link

Contract name cant be different to source file name #12

Closed TorstenStueber closed 1 year ago

TorstenStueber commented 1 year ago

The config.json file defines an object contracts that is a key-value map from contract names to file paths (where to find the contract source code).

The contract as it is called inside the source code file needs to be the same as the key of the key value pair. The reason is that the program currently assumes that the compiled artifacts will be found at <key>.contract and <key>.wasm in the buildFolder. However, the Solidity compiler will always create the compiled artifacts under the names <contractName>.contract and <contractName>.wasm as it does not allow to specify the file name of the artifacts.

Thus, the subsequent call to wasm-opt will fail if the contract name and the source file name are different as it requires the source file at .contractand.wasm`.