@antchain/mysolidity
v1.3.0
Published
Solidity smart contract compiler for AntChain.
Keywords
Readme
@antchain/mysolidity
Solidity smart contract compiler for AntChain.
Usage In Command
npm i @antchain/mysolidity -g
mysolc compile <your sol file path>Ant you can use arg for some setting like:
mysolc compile solidity/index.sol --debug --targetName test --solcConfig {\"optimizer\":{\"runs\":400}}mysolc help compile to find more info, and use DEBUG=antchain:* for view detail log.
Usage In NodeJS
npm i @antchain/mysolidity --save-devconst { compile } = require('@antchain/mysolidity');
compile({
contractEntryPath: 'path/to/YourContract.sol',
targetPath: 'path/to/dist',
targetName: 'index',
debug: true,
solcConfig: {
optimizer: {
enabled: true,
runs: 200,
},
},
});Usage In Browser
npm i @antchain/mysolidity --save-devimport { compileWithWebWorker } from '@antchain/mysolidity/browser';
const result = await compileWithWebWorker({
files: [
{
sourceName: 'index.sol',
content: `your code here`,
},
],
entryName: 'index.sol',
});Docs
https://opendocs.antchain.antgroup.com/myfish/contract-deploy
