-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We have deployed two DFOs: one old and one new. The aim is to implement functionality in the new DFO which allows old token holders to switch their old tokens for the new tokens. This should be done by burning the old tokens and minting the new tokens.
However I can't get the process to work. Calling the Switch contract results in a simple revert without reason. What could be the problem?
As far as we understand, similar process has been performed by the Buidl DFO and the Arte DFO and we copied most of the functionality from them.
Here is the process we have tried:
- Create old and new DFO in Ropsten
- Set total token amount 10000
- Set survey length to something biggish, like 10000
- Survey Quorum something small, like 5
- Max Cap something small, like 10
- Get old DFO's doubleproxy address
- Easiest to use web3 direct calls to DFO Core's getDoubleProxyAddress()
- Deploy the Switch contract with parameters:
- "0x123", // doubleProxyAddress of the new DFO
- "0x234", // oldTokenAddress
- , // startBlock
- 10000, // totalMintable
- [10000000], // time windows (block numbers) until which block multiplier and divider is used
- [1], // multipliers
- [1] // dividers
- Create proposal in new DFO
- Change Solidity version to 6.0
- Copypaste code (MintAndTransferFunctionality)
- Change the tokenSwitchAddress to be the address of the deployed switch contract
- New, description and discussion link arbitrary
- Compile -> Check "Needs Sender"
- Publish
- Vote to accept the proposal
- Perform the switch for some tokens:
- Increase allowance for VPS contract by the amount you want to switch:
- Send an allowance transaction to the old token contract
- Call the Switch contract's "yakuzaSwitch" (vasaPowerSwitch originally) function in Switch contract with the amount you want to switch
- Results in "Revert" without a message
- Increase allowance for VPS contract by the amount you want to switch:
The used contracts are the following:
- Old DFO
- Dapp: https://dapp.dfohub.com/?addr=0x53453571d73F15a1E6E5A45CB26bdB202e0da840
- Token: https://ropsten.etherscan.io/address/0x20dF2A22A573b38f9028d38ED59Ebe7726423d22
- Doubleproxy: 0x59095e53c903c80e37fa25b57fd812c6d58f13d3
- New DFO
- Dapp: https://dapp.dfohub.com/?addr=0xEC26Fde512Bc65f6e5EBa1134dF94a92Db0B7aF7
- Token: https://ropsten.etherscan.io/address/0xE9e4baF3908490458447e2CcC245f01FeB0d8A95
- Core: https://ropsten.etherscan.io/address/0xEC26Fde512Bc65f6e5EBa1134dF94a92Db0B7aF7
- Doubleproxy: 0x38367fe79846e4d0d04df18464da643a555f52aa
- Switch address: 0xF8E0Ae5Ec38A2193ad562B2552074F13e04FD360
Code for the used contracts can be found at https://github.com/microbecode/Yakuza-token/tree/master/Contracts
The transaction to the Switch contract is: https://ropsten.etherscan.io/tx/0x8417e0b6811a7144d8a99b1c63c4b2ad2fae7adf5be6f651f31ad94828bf450c
Allowance for the Switch is in place at the old token contract (checked that).