<!-- 1. Place this script tag on the <head> of your page: --><scripttype="text/javascript"src="https://new-widgets.rubic.exchange/iframe/bundle.new-app.min.js"></script><!-- 2. Place this div tag at the location where the Rubic Widget will be: --><divid="rubic-widget-root"></div><!-- 3. Place this script tag at the bottom of <body>: --><scriptdefertype="text/javascript">// describe widget configuration and saving to a global variable for future usevar configuration = {
from: 'ETH',
to: '0x3330BFb7332cA23cd071631837dC289B09C33333',
fromChain: 'ETH',
toChain: 'ETH',
amount: 1,
iframe: 'true',
hideSelectionFrom: false,
hideSelectionTo: true,
hideTokenSwitcher: false,
theme: 'dark',
injectTokens: {
'eth': [
'0x3330BFb7332cA23cd071631837dC289B09C33333'
]
},
slippagePercent: {
instantTrades: 2,
crossChain: 5
},
crossChainIntegratorAddress: '',
onChainIntegratorAddress: '',
whitelistOnChain: [],
blacklistOnChain: [],
whitelistCrossChain: [],
blacklistCrossChain: []
}
// prevent accidental changes to the object, for example, when re-creating a widget for another themeObject.freeze(configuration);
// create widget
rubicWidget.init(configuration);
</script>