truffle is a tool to create flatten file having openzeppelin libs contract.
This github project contract files are automatically generated by token fab blockchain-client application. To do this there are two simple contract.
- templates Any contract template can be created and added. This file name will be parameter of the deploy api. If you want to create a new contract, first create and commit its template folder and add these parameters to api call.
- contracts Contracts are automatically generated and push this github repo via blockchain-client app To verify the contract, use file ends with Verify.sol
- migrations Truffle template generated folder. Not use for our case
- test Truffle template generated folder. Not use for our case
Call the below sample api. Then you can see the new contract at etherscan.
curl -X POST http://localhost:7070/wallet/deploy -d '{"txKey":"1","chainId":"sepolia","tokenName":"TTNF","contractOwner":"0x2a2089e50CB2F0354fD8018C8fcC7538644e3673","contractTemplate":"FNFT1","manageType":"3","contractName":"TurnTurbine","precision":0,"contractPatameters":[{"name":"#NAME","value":"Turn Turbine"},{"name":"#URI","value":"https://nft.turnturbine.io/api/v1/tokens/"},{"name":"#MAXSUPPLY","value":"1000"},{"name":"#FNFT","value":"TurnTurbine"},{"name":"#TOKEN","value":"TTNF"}]}'
Call the below api and see its verify.sol file at contracts folder. Commit message has contract address and solidity version.
curl -X POST http://localhost:7070/wallet/verify -d '{"chainId":"sepolia","currency":"TTNF"}'
sudo apt install npm
npm install truffle -g
npm install truffle-flattener -g
npm install truffle
npm install @openzeppelin/[email protected]
truffle-flattener contracts/TurnEstate/TurnEstate.sol > contracts/TurnEstate/TurnEstateFlat.sol