<aside> 💡

This function is from the GlueStickERC20 or the GlueStickERC721. To better understand the Glue Ecosystem architecture and find the correct deployment addresses, visit Lore and Architecture | License & Deployments

</aside>

Compute the Glue Address

By passing your asset address (asset) to the computeGlueAddress function, you can predict the Glue address of any asset (ERC20, ERC721E) before deploying its Glue.

/** @notice Computes the address of the Glue contract for the given asset address.
* @dev Uses the Clones library to predict the address of the minimal proxy.
*
* @param asset The address of the asset contract.
* @return predictedGlueAddress The computed address of the Glue contract.
*
* Use cases:
* - Complex integrations requiring pre-knowledge of glue addresses
* - Front-end preparation before actual glue deployment
* - Cross-contract interactions that reference glue addresses
* - Security verification of expected deployment addresses
*/
function computeGlueAddress(address asset) external view returns (address predictedGlueAddress);

Predicting Glue Address Before Deployment

Predicting the Glue address before deployment allows for more seamless integration and can be useful for various pre-deployment configurations.

// You can predict the Glue Address:

.computeGlueAddress(
	"0x32.ffa" // Passing the asset address.
);

// it'll returns "0x90.7fa" The predicted Glue Address before to apply the Glue.

Frequently Asked Questions (FAQ)


← Previous

Get Flash-Loans from collateral

Next →

Check Asset Compatibility