To transfer Ownership of the contract to a different address, call
transferOwnership(address newOwner) with
newOwner being the address you wish to make the Owner. This allows
newOwner to do things like update the collection amount and the beneficiary where amounts are sent.
To update the collection amount taken from trades executed using the contract, call
_basisPoints being a number greater than or equal to 1
The basisPoints variable represents how to calculate the collection amount taken from the "to" token, this is then split 80/20 between the platform using the contract and DEX.AG.
To update the address where the collection amounts are sent to, call
setBeneficiary(address beneficiary)with the
beneficiary parameter being an address where you wish to receive collection amounts. This can be either a wallet address or a contract address.
You can also do this with other web3 management tools. However, we will use Etherscan in this demo. To set the collection amounts or beneficiary variable for an already deployed contract, follow these steps.
Go to Etherscan.io to use their contract interaction feature.
Go to the address that your proxy contract is located at. Your contract will need to be verified on Etherscan which should be set up when it is deployed. For contracts that DEX.AG deploys for you, DEX.AG will handle contract verification.
Select the Contract tab to see the verified code along with options to Read from the contract and Write to the contract. We will be using the Write Contract feature.
When you select Write Contract you will see a list of functions that can be called from the page. Before writing to the contract, you'll need to Connect your web3 wallet (for example, Metamask) by clicking Connect to Web3. Make sure that you are connecting with the address listed as the owner of the contract.
Since we are looking at setting the basisPoints for the contract, we will go to the setBasisPoints function.All that is needed is for you to fill out the basisPoints field with the amount you wish to change the basisPoints to and then click write
Confirm the transaction when prompted by your web3 provider. Once the transaction is confirmed, the setting will be changed in your contract. These steps will work for all the contract settings functions (setBasisPoints, setBeneficiary, transferOwnership, etc.)