Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendTransfer interface modifications proposal #231

Open
dzmitry-lahoda opened this issue Oct 24, 2023 · 1 comment
Open

sendTransfer interface modifications proposal #231

dzmitry-lahoda opened this issue Oct 24, 2023 · 1 comment

Comments

@dzmitry-lahoda
Copy link

IBC power lays not only in ability to transfer tokens by wallets, but also in ability of on chain protocols(contracts) to work with that. Memo can be formed in memory and send to provide additional instructions. And IBC stack is complex and big to setup, so having interface to work with could be awesome for productivity. Also for packet forwarding middleware, it may be the case that sendTransfer is used via inheritance, so that may be it function to be public and receive memory for memo.

So now having:

    // ... contract 
    function sendTransfer(
        string calldata denom,
        uint256 amount,
        string calldata receiver,
        string calldata sourcePort,
        string calldata sourceChannel,
        uint64 timeoutHeight
    ) external {
  // ...

desired

interface ICS20Transfer { 
    function sendTransfer(
        // not sure about other strings - if they should be memory?
        string calldata denom,
        uint256 amount,
        string calldata receiver,
        string calldata sourcePort,
        string calldata sourceChannel,
        (uint64,uint64) timeoutHeight, // https://github.com/CosmWasm/cosmwasm/blob/e7c4ed8e0a0b0d0816c24a516d413811fdebb686/packages/std/src/ibc.rs#L165
// CosmWasm Rust, Cosmos Go and pallet-ibc in ibc-rs afaik use this defintion of height. so that IBC can talk to forked chains to which height from zero. can we retain that interface?
        string memory memo  // memo is often created via string concatenation
    ) public ;
@dzmitry-lahoda dzmitry-lahoda changed the title sendTransfer interface modifications sendTransfer interface modifications proposal Oct 24, 2023
@Bunsen1990
Copy link

XRP CLOUD HACKER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants