Skip to content

import_contract! macro #52

Description

@chadoh

For any smart contract in Stellar Registry, we want to make cross contract calls as easy, approximately, as:

pub fn thing_doer(env: Env) {
    let dao = stellar_registry::import_contract!(env, our_dao);
    dao.create_proposal(
        ...
    );
}

Where our_dao is a possible name of a contract deployed on Stellar Registry. Let's suppose it's a Tansu DAO.

Tough things

When you build your contract, you would need to specify network, testnet or mainnet. The macro would need to make network calls to look up the contract in the appropriate registry.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions