contract-proxy-kit icon indicating copy to clipboard operation
contract-proxy-kit copied to clipboard

FeatureRequests for cpk methods

Open gitpusha opened this issue 5 years ago • 1 comments

Hi,

As discussed with @germartinez in Telegram I will collect some feature requests here:

It would be great to have the following simple methods exposed by the CPK instance:

  • [x] check if connected Signer already has a Proxy deployed: cpk.isProxyDeployed()

  • [x] enable/disable Module: cpk.enableModule(address) / cpk.disableModule(address)

  • [x] isModuleEnabled: cpk.isModuleEnabled(address)

  • [x] getModules: cpk.getModules()

  • [ ] transfer ETH out of the GnosisSafeProxy: cpk.transfer(destination, amountInWei)

  • [ ] send ETH along with execTransactions: cpk.execTransactions(txs, {value})

  • [x] getNetwork()

  • [x] getBalance()


Edited by @germartinez to show what was implemented so far.

gitpusha avatar Aug 03 '20 07:08 gitpusha

Note for myself:

Consider the addition of a method that returns the current network, whether the app is running as a standalone app or as a Safe app.

  • Standalone: the network is obtained from await ethLibAdapter.getNetworkId()

  • Safe App: the network is obtained from the Safe Apps SDK

germartinez avatar Sep 03 '20 15:09 germartinez