From 07c475674c3150ab50d75b2b7df3e33420f2fffc Mon Sep 17 00:00:00 2001 From: Alex Rea Date: Mon, 16 Dec 2024 17:17:22 +0000 Subject: [PATCH] Use reworked domain receiving logic --- contracts/bridging/ProxyColony.sol | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contracts/bridging/ProxyColony.sol b/contracts/bridging/ProxyColony.sol index 95d5c1fc97..5ee7eb204d 100644 --- a/contracts/bridging/ProxyColony.sol +++ b/contracts/bridging/ProxyColony.sol @@ -80,7 +80,16 @@ contract ProxyColony is DSAuth, Multicall, CallWithGuards, BasicMetaTransaction ? address(domainTokenReceiverAddress).balance : ERC20Extended(_token).balanceOf(address(domainTokenReceiverAddress)); - DomainTokenReceiver(domainTokenReceiverAddress).transferToColony(_token); + if (_token == address(0x0)) { + DomainTokenReceiver(domainTokenReceiverAddress).transferNativeToColony(); + } else { + DomainTokenReceiver(domainTokenReceiverAddress).approveTokenToColony(_token); + // slither-disable-next-line arbitrary-send-erc20 + require( + ERC20Extended(_token).transferFrom(domainTokenReceiverAddress, address(this), balance), + "colony-funding-transfer-failed" + ); + } bytes memory payload = abi.encodeWithSignature( "recordClaimedFundsFromBridge(uint256,address,uint256,uint256)",