SDKs
SDK to deploy and manage your contracts through the FlexSmart platform.
Installation
npm install @flexsmart/flexsmart-sdkGenerate Contracts
Running the following command would generate the classes for the contracts currently available at FlexSmart.
npx flexsmart generateYou could generate the contract for your own ABIs by running the following command.
npx flexsmart generate /path/to/the/contractABI.jsonDeploy Contracts
You can deploy contracts via the SDK and manage them later on the FlexSmart platform.
Deploy an ERC20 token:
import { FlexsmartSDK } from '@flexsmart/flexsmart-sdk';
...
const sdk = new FlexsmartSDK(web3Signer);
sdk.setAPIKey('YOUR-API-KEY');
const result = await sdk.deployERC20({
name: 'SDK Coin',
symbol: 'SDKCOIN',
initialSupply: 10000,
isFullFeature: true,
decimals: 18,
});
...Deploy an BEP20 token:
Deploy an ERC777 token:
Deploy an Escrow contract:
Manage Contracts
You could manage your deployed contracts quickly and easily with the FlexSmart SDK.
Manage an ERC20 Token
Manage a BEP20 Token
Manage an ERC777 Token
Manage an Escrow contract
Last updated
Was this helpful?