From ad0fb33746a6a9b3ee00c661dbe06fe2ad6a457a Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Wed, 11 Oct 2023 21:28:02 +0100 Subject: [PATCH] fix: use broadcaster as user --- script/ExactlyDraft.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/ExactlyDraft.sol b/script/ExactlyDraft.sol index 1a02075..52390ee 100644 --- a/script/ExactlyDraft.sol +++ b/script/ExactlyDraft.sol @@ -40,13 +40,13 @@ contract ExactlyDraftScript is BaseScript { function run() public virtual broadcast returns (uint256[] memory streamIds) { // Deploy an instance of PRBProxy. For more info, see: // https://docs.sablier.com/contracts/v2/guides/proxy-architecture/overview - // IPRBProxy proxy = PROXY_REGISTRY.getProxy({ user: address(this) }); + // IPRBProxy proxy = PROXY_REGISTRY.getProxy({ user: broadcaster }); // if (address(proxy) == address(0)) { // proxy = PROXY_REGISTRY.deployAndInstallPlugin({ plugin: IPRBProxyPlugin(SABLIER_PROXY_PLUGIN) }); // } // // Approve the proxy to transfer $EXA - uint256 allowance = EXA.allowance({ owner: address(this), spender: address(SABLIER_LOCKUP_DYNAMIC) }); + uint256 allowance = EXA.allowance({ owner: broadcaster, spender: address(SABLIER_LOCKUP_DYNAMIC) }); if (allowance < AGGREGATE_AMOUNT) { EXA.approve({ spender: address(SABLIER_LOCKUP_DYNAMIC), amount: AGGREGATE_AMOUNT }); }