Skip to main content
added 309 characters in body
Source Link

Contract N1 interfaces method A in contract N2.

Once method A in contract N2 successfully executes, it logs an event on the blockchain and it passes as argument the output of the method.

You then use a service which monitors your contracts events (such as Openzeppelin Defender Sentinels) to catch the events of your contract, send you a webhook, parse the json of the webhook extract the parameter that was passed with the event that you want to pass to N1 and use the output of method N2 to then call using web3.jspy contract N1.

Alternatively, you can simply interface method 1 N2 in method 1 N1, and return the value as a normal return variable without any inbetween off chain stuff happening and this would all be on chain which is better and cheaper.

Contract N1 interfaces method A in contract N2.

Once method A in contract N2 successfully executes, it logs an event on the blockchain and it passes as argument the output of the method.

You then use a service which monitors your contracts events (such as Openzeppelin Defender Sentinels) to catch the events of your contract, send you a webhook, parse the json of the webhook and use the output of method N2 to then call using web3.js contract N1.

Contract N1 interfaces method A in contract N2.

Once method A in contract N2 successfully executes, it logs an event on the blockchain and it passes as argument the output of the method.

You then use a service which monitors your contracts events (such as Openzeppelin Defender Sentinels) to catch the events of your contract, send you a webhook, parse the json of the webhook extract the parameter that was passed with the event that you want to pass to N1 and use the output of method N2 to then call using web3.py contract N1.

Alternatively, you can simply interface method 1 N2 in method 1 N1, and return the value as a normal return variable without any inbetween off chain stuff happening and this would all be on chain which is better and cheaper.

Source Link

Contract N1 interfaces method A in contract N2.

Once method A in contract N2 successfully executes, it logs an event on the blockchain and it passes as argument the output of the method.

You then use a service which monitors your contracts events (such as Openzeppelin Defender Sentinels) to catch the events of your contract, send you a webhook, parse the json of the webhook and use the output of method N2 to then call using web3.js contract N1.