gno icon indicating copy to clipboard operation
gno copied to clipboard

trigger contract in onchain

Open r3v4s opened this issue 1 year ago • 0 comments

Description

Just like https://github.com/gnolang/gno/pull/1275, this register pattern allows us to call several grc20 tokens without manually importing it. HOWEVER, it requires that token(or token's function) must be registered to registry contract which (AFAIK) can only be done by making new transaction call manually.

One way to resolve this limit is, re use architecture from faucet during certain process like below

  1. use tx indexer to monitor chain activity
  2. (if /vm.m_addpkg is success) check whether deployed contract is grc20 or not
  3. (if it is grc20) proceed (make tx -> sign tx -> broadcast tx) using similar system from faucet

As you can see, it requires bit of 3rd party resources and honestly it would better if we can handle this on-chain.

If we can trigger other contract without jumping in from outside, we can do some automation I think. WDYT ??

cc @zivkovicmilos @moul @dongwon8247 @notJoon @mconcat

r3v4s avatar Mar 05 '24 09:03 r3v4s