Programming

programmer help needed separate Oracle contract.

Started by mt102 · Jul 14, 2026

#10937
Hi everyone, I need some clarification on a blockchain architecture I'm trying to understand.

I was told to create a custom token, then create a separate Oracle contract. The Oracle stores metadata such as the token address, name, symbol, decimals, logo URI, treasury, faucet, and other project information. It exposes this information through public smart contract functions, and for applications that cannot read the blockchain directly, the same data is exposed through a REST/GraphQL API.

I was also told:

"You need to permit wallets to query arbitrary Oracle contracts. Not all wallets do."

The Oracle returns the metadata through public functions.

Compatible wallets or applications query the Oracle and display the logo and project information.

However, I'm stuck on the discovery mechanism.

If I deploy a new token and a new Oracle contract, how does a wallet know which Oracle contract to query?

Specifically:

what mechanism allows Trust Wallet to find and trust a custom Oracle contract?

Any examples would be greatly appreciated. Thank you
#10938
↳ Replying to @mt102
"If I deploy a new token and a new Oracle contract, how does a wallet know which Oracle contract to query?"

It doesn't, Trust Wallet (and every mainstream wallet) get token metadata off chain from specific lists, only basic data like name is stored in the token contract. You need to submit metadata to trust wallets assets on github with a PR under your contract addr and then a human reviews it.

I think this is what you will be looking for: https://github.com/trustwallet/assets#how-to-add-token

Hope this helps :)
#10939
↳ Replying to @mt102
Trust Wallet uses a centralized GitHub repo for token metadata. For custom oracles, there is no on-chain discovery standard. Most projects submit a PR to Trust Wallet's asset repo, or they build a wrapper API that maps contract addresses to oracle addresses off-chain. If you want true decentralization, consider using ENS or a registry contract.
#10941
↳ Replying to @mt102
No problem. If you ever need help with a project, I build Python tools for security and automation. Just ask.