Skip to main content

OTR Smart Contract

You can interact directly with the OTR smart contract to register new tipping coins. Your app can charge an optional fee (up to 10%) when registering tipping symbols. You can find the ABI and contract code at the links below.

The cost for registering a tipping symbol is 250,000 $TN100x on Ham chain

TN100x: 0xE8DD44d0791B73afe9066C3A77721f42d0844bEB

OTR Proxy: 0x0181795609a431A8C39eF020ad58f20fE77E8525

OTR Implementation: 0x87a8a4F4F4c5e1b4de47C36D4c70076E304E7DE4

The main function you will interact with is the register function via the OTR Proxy address. For an example of calling this function from a frontend app see this example.

/// @notice Function used to register new tipping tokens
/// @dev Sender must approve fee before calling this method
/// @param tokenAddress ERC20 token that will be tipped. A new corresponding tipping token contract will be deployed for this token.
/// @param tippingSymbolHash Hashed tipping symbol ie viem.toHex("$TIP")
/// @param bpsFee Optional UI registration fee using basis points ie 10% = 1000
/// @param feeRecipient Optional recipient of UI fee
function register(address tokenAddress, bytes calldata tippingSymbolHash, uint bpsFee, address feeRecipient) public returns (address){
if(bpsFee > MAX_UI_FEE) {
revert FeeTooHigh();
}
uint fee = REGISTRATION_FEE * bpsFee / 10_000;
uint costMinusFee = REGISTRATION_FEE - fee;
IERC20(PAYMENT_TOKEN).transferFrom(msg.sender, FEE_RECEIVER, costMinusFee);
if(fee > 0) {
IERC20(PAYMENT_TOKEN).transferFrom(msg.sender, feeRecipient, fee);
}
address tippingToken = IFloatiesRegistry(REGISTRY).register(
IFloatiesRegistry.RegistrationParams({
token: tokenAddress,
registrant: tokenAddress,
floatyHash: tippingSymbolHash
})
);

return tippingToken;
}