Proxy Contract Settings

Owner Setting

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.

Collection Setting

To update the collection amount taken from trades executed using the contract, call setBasisPoints(uint256 _basisPoints)with _basisPoints being a number greater than or equal to 1
Collection Percentages are calculated by dividing the basis points variable by 100. For example: to set a total collection of 1%, you would set the basis points value to 100.
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.

Beneficiary Setting

To update the address where the collection amounts are sent to, callsetBeneficiary(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.

Example: Changing Proxy Contract Settings using Etherscan

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 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.)
Last modified 2yr ago