function trade(uint256 amount) public { // some code // you can pass the address of the deployed SkillsCoin contract as a parameter to the constructor of the RareCoin contract as 'source' (bool ok, bytes memory result) = source.call(abi.encodeWithSignature("transferFrom(address,address,uint256)", msg.sender, address(this), amount)); // this will fail if there is insufficient approval or balance require(ok, "call failed"); // more code }