Minter Widget
Architecture (Ethereum)

Deploy Minter Widget
Request Mint
Last updated
yarn add @usdv/usdv-widget npm install @usdv/usdv-widgetimport {bootstrapWidget} from '@usdv/usdv-widget';
bootstrapWidget({color: YOUR_COLOR_NUMBER});<!-- DO NOT USE SELF CLOSING TAGS -->
<div class="center">
<usdv-widget style="padding:20px"></usdv-widget>
</div><!-- DO NOT USE SELF CLOSING TAGS -->
<div class="center">
<usdv-tracker style="width:468px;margin-bottom:10px"></usdv-tracker>
<usdv-mint style="background-color:white;border-radius:16px;padding:20px"></usdv-mint>
</div>import {bootstrapWidget, themes} from '@usdv/usdv-widget';
bootstrapWidget({color: YOUR_COLOR_NUMBER, theme: themes.dark});bootstrapWidget({color: YOUR_COLOR_NUMBER, isTestnet: true});// for testnet
bootstrapWidget({
color: YOUR_COLOR_NUMBER,
isTestnet: true,
bridgeRecolorConfig: [
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'fuji',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'arbitrum-goerli',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'bsc-testnet',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'optimism-goerli',
},
],
});
// for mainnet
bootstrapWidget({
color: YOUR_COLOR_NUMBER,
bridgeRecolorConfig: [
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'avalanche',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'arbitrum',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'bsc',
},
{
address: YOUR_BRIDGE_RECOLOR_ADDRESS,
chainKey: 'optimism',
},
],
}); function mint(
address _token, // must be whitelisted assets like STBT
address _receiver, // receiver of the minted USDV
uint64 _usdvAmount, // target USDV amount to mint
uint32 _color, // color of the USDV
bytes32 _memo // a reserved field to record meaning extra data for mint
) public {}