jangyungi
3 months ago  Karma: 15
Can I call any (arbitrary) functions on the main-net using Transfer Gateway?

Hello,

I am the developer of a DApp named CryptoSaga, and waiting for further information on Transfer Gateway to be revealed. Our game has been already released on the main-net so that I believe the assets of players (ERC721 tokens) should be transferred to a DAppChain during the execution of the game-logic is running (with lower gas price) and then transferred back to the main-net if the players want to trade them via third-party exchanges on the main-net.

As far as I understand, Transfer Gateway enables ERC20/ERC721 asset transfer from main-net to loom side-chain and vice versa. That's good. But I wonder whether Transfer Gateway enables calling any arbitrary functions other than transferring from Ethereum main-net to DAppChain?

For example, CryptoSaga's ERC721 assets have additional values like EXP, Level, BP, and so on. The heroes (which are ERC721 tokens) receives EXP after each battle. This is done by calling addExp() function of the hero contract, which implements ERC721. Let's say if a hero on DAppChain receives EXP. Can this changes be applied to the hero on the Ethereum main-net?

en
#DApp
#game
CryptoSaga
Transfer Gateway
jangyungi
3 months ago  Karma: 15
Can I call any (arbitrary) functions on the main-net using Transfer Gateway?

Hello,

I am the developer of a DApp named CryptoSaga, and waiting for further information on Transfer Gateway to be revealed. Our game has been already released on the main-net so that I believe the assets of players (ERC721 tokens) should be transferred to a DAppChain during the execution of the game-logic is running (with lower gas price) and then transferred back to the main-net if the players want to trade them via third-party exchanges on the main-net.

As far as I understand, Transfer Gateway enables ERC20/ERC721 asset transfer from main-net to loom side-chain and vice versa. That's good. But I wonder whether Transfer Gateway enables calling any arbitrary functions other than transferring from Ethereum main-net to DAppChain?

For example, CryptoSaga's ERC721 assets have additional values like EXP, Level, BP, and so on. The heroes (which are ERC721 tokens) receives EXP after each battle. This is done by calling addExp() function of the hero contract, which implements ERC721. Let's say if a hero on DAppChain receives EXP. Can this changes be applied to the hero on the Ethereum main-net?

en
#DApp
#game
CryptoSaga
Transfer Gateway

3 ANSWERS
luke2
3 months ago Karma: 1866

Okay, I see what you are doing. So you already have everything on mainnet, in this case, if you were to save all the data back to mainnet there will be 0 cost savings. You can't even do it in batch since it appears your contract hasn't implemented any batch functions.

What you should do is to have the token (representing ownership) separate from the data that represents the exp, location, etc. The data and all the code that modify it can be deployed on the sidechain (free tx, fast confirmation, all that jazz) while the ownership is on ethereum.

Okay, I see what you are doing. So you already have everything on mainnet, in this case, if you were to save all the data back to mainnet there will be 0 cost savings. You can't even do it in batch since it appears your contract hasn't implemented any batch functions.

What you should do is to have the token (representing ownership) separate from the data that represents the exp, location, etc. The data and all the code that modify it can be deployed on the sidechain (free tx, fast confirmation, all that jazz) while the ownership is on ethereum.

yo0g6
3 months ago Karma: 655

Hi, I'm not sure what are you trying to achieve... The way I see it, after each battle (on the sidechain) the changes will be applied to your hero (ERC721 token). When you transfer the token back to the Ethereum network, the changes are going to be preserved.

Hi, I'm not sure what are you trying to achieve... The way I see it, after each battle (on the sidechain) the changes will be applied to your hero (ERC721 token). When you transfer the token back to the Ethereum network, the changes are going to be preserved.

jangyungi

That's what I wanted to check. So do you mean that the changes on the tokens other than the ERC721 standard features (transfer, approve, etc) will be preserved? (For example, EXP or Level of heroes.)

Jun 22 '18 at 11:40 am
luke2
3 months ago Karma: 1866

Can you link your verified contract here? Best to just look at source code

Can you link your verified contract here? Best to just look at source code

jangyungi

https://etherscan.io/address/0xabc7e6c01237e8eef355bba2bf925a730b714d5f#readContract
https://etherscan.io/address/0xabc7e6c01237e8eef355bba2bf925a730b714d5f#writeContract
This contract extends ERC721 standard.

Jun 22 '18 at 12:00 pm
Earn tokens by posting and answering questions about blockchain!
Karma to eth
YOUR ANSWER