Has anyone attempt to build smart contracts for reconciliation and approval workflows/process?
E.g., if fields match, update the string variable and evoke another contract to request for approval
Nathan Aw
Has anyone attempt to build smart contracts for reconciliation and approval workflows/process?
E.g., if fields match, update the string variable and evoke another contract to request for approval
Nathan Aw
I find the following pattern can be used quite easily for interacting with different contracts. Using interfaces allows you to easily specify the function signatures for different contracts so that your contract knows how to talk to other ones.
interface TestInterface {
function someAction() external returns (bool);
}
contract SomeContract {
TestInterface public tI = TestInterface(address(0));
function someFunc(string _someString) public returns (bool) {
if (keccak256(_someString) == keccak256("hello")) {
require(tI.someAction());
}
}
}
Links:
https://solidity.readthedocs.io/en/v0.4.21/contracts.html#interfaces