contracts
directory. In the directory, create your BEP-1155 contract: BNBSmartChain1155.sol
.
FUNGIBLE
and 1 non-fungible unit called NON-FUNGIBLE
. In the BEP-1155 standard, setting a token issuance to 1
makes it non-fungible.JSON_URI
which is a locator for the metadata of your tokens hosted externally. For example, <https://token-cdn-domain/{id}.json>
. See EIP-1155 for details.2_deploy_contracts.js
in the migrations
directory.
HDWalletProvider
.
HDWalletProvider is Truffle’s separate npm package used to sign transactions.
Run:
truffle-config.js
to add:
HDWalletProvider
testnet
— any network name that you will pass to the truffle migrate --network
command.HDWalletProvider
— Truffle’s custom provider to sign transactions.network_id
— the network ID of the BNB Smart Chain network: mainnet is 56
, testnet is 97
.solc
— the Solidity compiler version that Truffle must use. OpenZeppelin contracts have a higher version Solidity compiler requirement than the default Truffle installation, hence you must provide a specific compiler version.2_deploy_contracts.js
and deploy the contract to the BNB Smart Chain testnet as specified in truffle-config.js
.
.sol
file to make BscScan be able to verify it.
contracts
directory, run:
SPDX
mentions in the file and remove all of them except for the very first one.
contract address
field.
.sol
contract in the Enter the Solidity Contract Code below field.
0
to check your fungible balance and put 1
to check your non-fungible balance.