diff --git a/index.html b/index.html index f81c5ba..e1e8320 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ DORA Token Migration - - + + - +
diff --git a/src/constants/abi/ethDYDXContractAbi.json b/src/constants/abi/ethDYDXContractAbi.json deleted file mode 100644 index e0e92ff..0000000 --- a/src/constants/abi/ethDYDXContractAbi.json +++ /dev/null @@ -1,415 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "mintingBlob", - "type": "bytes" - } - ], - "name": "LogMintFor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fundsOwner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "adminApproval", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "_decimals", - "type": "uint8" - } - ], - "name": "initlialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "mintingBlob", - "type": "bytes" - } - ], - "name": "mintFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "registerAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setBalance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/constants/abi/index.ts b/src/constants/abi/index.ts index 783d8b4..1a10537 100644 --- a/src/constants/abi/index.ts +++ b/src/constants/abi/index.ts @@ -1,6 +1,4 @@ import bridgeContractAbi from './bridgeContractAbi.json'; -import ethDYDXContractAbi from './ethDYDXContractAbi.json'; -import ethINFContractAbi from './ethDYDXContractAbi.json'; -import wethDYDXContractAbi from './wethDYDXContractAbi.json'; +import ethINFContractAbi from './ethINFContractAbi.json'; -export { bridgeContractAbi, ethDYDXContractAbi, wethDYDXContractAbi, ethINFContractAbi }; +export { bridgeContractAbi, ethINFContractAbi }; diff --git a/src/constants/abi/wethDYDXContractAbi.json b/src/constants/abi/wethDYDXContractAbi.json deleted file mode 100644 index 3e84423..0000000 --- a/src/constants/abi/wethDYDXContractAbi.json +++ /dev/null @@ -1,882 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "tokenAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "accAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "Bridge", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "DelegatedPowerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DELEGATE_BY_TYPE_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DELEGATE_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DYDX_TOKEN", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EIP712_DOMAIN", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EIP712_VERSION", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_nextAvailableBridgeId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "_propositionPowerDelegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "_propositionPowerSnapshots", - "outputs": [ - { - "internalType": "uint128", - "name": "blockNumber", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "value", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "_propositionPowerSnapshotsCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "_votingDelegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "_votingSnapshots", - "outputs": [ - { - "internalType": "uint128", - "name": "blockNumber", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "value", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "_votingSnapshotsCounts", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "accAddress", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "memo", - "type": "bytes" - } - ], - "name": "bridge", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "delegateByType", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateByTypeBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "getDelegateeByType", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - }, - { - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "getPowerAtBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "enum IGovernancePowerDelegationERC20.DelegationType", - "name": "delegationType", - "type": "uint8" - } - ], - "name": "getPowerCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/constants/account.ts b/src/constants/account.ts index c2ac4bb..3ce2ce2 100644 --- a/src/constants/account.ts +++ b/src/constants/account.ts @@ -2,7 +2,7 @@ * OnboardingSteps * 1. Choose wallet * 2. Key derivation - * a. If wallet has no dYdX Chain transactions and not on whitelist, sign twice (future) + * a. If wallet has no Vota Chain transactions and not on whitelist, sign twice (future) * i. Success * ii. Signatures don't match error (Wallet is non-deterministic) * b. Success diff --git a/src/constants/localStorage.ts b/src/constants/localStorage.ts index 2626a38..ef45a78 100644 --- a/src/constants/localStorage.ts +++ b/src/constants/localStorage.ts @@ -1,14 +1,14 @@ export enum LocalStorageKey { // Onboarding / Accounts - EvmAddress = 'dydx.migrate.EvmAddress', - DoraAddress = 'dydx.migrate.DoraAddress', - OnboardingSelectedWalletType = 'dydx.migrate.OnboardingSelectedWalletType', - WalletConnectionType = 'dydx.migrate.WalletConnectionType', - OnboardingHasAcknowledgedTerms = 'dydx.migrate.OnboardingHasAcknowledgedTerms', - EvmDerivedAddresses = 'dydx.migrate.EvmDerivedAddresses', + EvmAddress = 'dora.migrate.EvmAddress', + DoraAddress = 'dora.migrate.DoraAddress', + OnboardingSelectedWalletType = 'dora.migrate.OnboardingSelectedWalletType', + WalletConnectionType = 'dora.migrate.WalletConnectionType', + OnboardingHasAcknowledgedTerms = 'dora.migrate.OnboardingHasAcknowledgedTerms', + EvmDerivedAddresses = 'dora.migrate.EvmDerivedAddresses', // UI State - SelectedLocale = 'dydx.migrate.SelectedLocale', + SelectedLocale = 'dora.migrate.SelectedLocale', } export const LOCAL_STORAGE_VERSIONS = { diff --git a/src/constants/localization.ts b/src/constants/localization.ts index e366ba5..6c789e3 100644 --- a/src/constants/localization.ts +++ b/src/constants/localization.ts @@ -53,12 +53,7 @@ export const DORA_LONG_SENTENCE = { "MIGRATION_FAQ_VCDORA_HOLDER_ANSWER": "vcDORA credits on the vcDORA Ethereum smart contract will still be valid until all DORA tokens staked in the vcDORA smart contract exit. Once you can withdraw your ethDORA from the vcDORA smart contract, you can immediately engage with the migration portal. If you still cannot withdraw from the vcDORA smart contract, please don’t worry as the vcDORA contract will remain and be maintained on Eththeum.", "MIGRATION_FAQ_HOW_TO_TRACK_ANSWER": "Please use https://vota-migration.dorafactory.org/ to track migration status.", "MIGRATION_FAQ_HOW_TO_TRACK": "How can I track the migration status?", - "MIGRATION_FAQ_WHAT_ADDRESS_ANSWER": "Users who interact with the portal can send dYdX Chain DYDX tokens to any dYdX Chain address. User’s can send tokens directly to their dYdX Chain address that is automatically created from their Ethereum address’s signature.", - "MIGRATION_FAQ_WHAT_ADDRESS": "What address can I send dYdX Chain DYDX to?", - "MIGRATION_FAQ_WHAT_TOKENS_ANSWER": "Holders who successfully engage with the portal will receive wethDYDX on Ethereum and DYDX on dYdX Chain.", "MIGRATION_FAQ_WHAT_TOKENS": "What tokens will I receive?", - "MIGRATION_FAQ_WRAPPED_TOKENS_ANSWER": "wethDYDX are minted 1:1 to any users who successfully send Ethereum-based DYDX to the smart contract. wethDYDX have the same v3 governance rights as Ethereum-based DYDX, and are transferable. wethDYDX cannot be bridged to v4.", - "MIGRATION_FAQ_WRAPPED_TOKENS": "What are wrapped Ethereum DYDX tokens (“wethDYDX”)?", "MIGRATION_BLOCKED_MESSAGE_DESTINATION": "Because the destination address appears to be a resident of, or using this user interface from, a jurisdiction that violates our terms of use, or has engaged in activity that violates our terms of use, the destination address has been blocked and this transaction cannot be completed.", } diff --git a/src/constants/wallets.ts b/src/constants/wallets.ts index 37a18f9..9d5a0ee 100644 --- a/src/constants/wallets.ts +++ b/src/constants/wallets.ts @@ -9,9 +9,7 @@ import { isMetaMask } from '@/lib/wallet/providers'; // Wallet connection types export enum WalletConnectionType { - CoinbaseWalletSdk = 'coinbaseWalletSdk', InjectedEip1193 = 'injectedEip1193', - WalletConnect2 = 'walletConnect2', } export enum WalletErrorType { @@ -32,33 +30,21 @@ type WalletConnectionTypeConfig = { }; export const walletConnectionTypes: Record = { - [WalletConnectionType.CoinbaseWalletSdk]: { - name: 'Coinbase Wallet SDK', - wagmiConnectorId: 'coinbaseWallet', - }, [WalletConnectionType.InjectedEip1193]: { name: 'injected EIP-1193 provider', wagmiConnectorId: 'injected', }, - [WalletConnectionType.WalletConnect2]: { - name: 'WalletConnect 2.0', - wagmiConnectorId: 'walletConnect', - }, }; // Wallets export enum WalletType { - CoinbaseWallet = 'COINBASE_WALLET', MetaMask = 'METAMASK', - WalletConnect2 = 'WALLETCONNECT_2', OtherWallet = 'OTHER_WALLET', } export const DISPLAYED_WALLETS: WalletType[] = [ WalletType.MetaMask, - WalletType.WalletConnect2, - WalletType.CoinbaseWallet, WalletType.OtherWallet, ]; @@ -94,7 +80,7 @@ export const wallets: Record = { type: WalletType.OtherWallet, stringKey: "Other", icon: GenericWalletIcon, - connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], + connectionTypes: [WalletConnectionType.InjectedEip1193], matchesInjectedEip1193: (provider) => Object.entries(wallets).every( ([walletType, walletConfig]) => @@ -103,27 +89,14 @@ export const wallets: Record = { !walletConfig.matchesInjectedEip1193(provider) ), }, - [WalletType.CoinbaseWallet]: { - type: WalletType.CoinbaseWallet, - stringKey: "Coinbase Wallet", - icon: CoinbaseIcon, - connectionTypes: [WalletConnectionType.CoinbaseWalletSdk, WalletConnectionType.InjectedEip1193], - matchesInjectedEip1193: (provider) => provider.isCoinbaseWallet, - }, [WalletType.MetaMask]: { type: WalletType.MetaMask, stringKey: "MetaMask", icon: MetaMaskIcon, - connectionTypes: [WalletConnectionType.InjectedEip1193, WalletConnectionType.WalletConnect2], + connectionTypes: [WalletConnectionType.InjectedEip1193], matchesInjectedEip1193: isMetaMask, walletconnect2Id: WALLET_CONNECT_EXPLORER_RECOMMENDED_WALLETS.Metamask, }, - [WalletType.WalletConnect2]: { - type: WalletType.WalletConnect2, - stringKey: "WalletConnect", - icon: WalletConnectIcon, - connectionTypes: [WalletConnectionType.WalletConnect2], - }, }; // Injected EIP-1193 Providers @@ -155,22 +128,22 @@ export type WalletConnection = { provider?: ExternalProvider; }; -// dYdX Chain wallets +// Chain wallets import { type onboarding } from '@dydxprotocol/v4-client-js'; export const COSMOS_DERIVATION_PATH = "m/44'/118'/0'/0/0"; /** - * @description typed data to sign for dYdX Chain onboarding + * @description typed data to sign for Dora Vota Chain onboarding */ export const SIGN_TYPED_DATA = { - primaryType: 'dYdx', + primaryType: 'DORA', domain: { name: 'Dora Vota', }, types: { - dYdx: [{ name: 'action', type: 'string' }], + DORA: [{ name: 'action', type: 'string' }], }, message: { action: 'DORA Token Migration Onboarding', diff --git a/src/hooks/migrate/useTokenAllowance.tsx b/src/hooks/migrate/useTokenAllowance.tsx index 66d9db0..d899f11 100644 --- a/src/hooks/migrate/useTokenAllowance.tsx +++ b/src/hooks/migrate/useTokenAllowance.tsx @@ -3,7 +3,6 @@ import BigNumber from 'bignumber.js'; import { useContractWrite, useContractRead, useWaitForTransaction } from 'wagmi'; -import { ethDYDXContractAbi } from '@/constants/abi'; import { ethINFContractAbi } from '@/constants/abi'; import { TOKEN_DECIMAL_SHIFT } from '@/constants/migrate'; diff --git a/src/hooks/useAccountBalance.tsx b/src/hooks/useAccountBalance.tsx index 0cd1ae9..8253ca2 100644 --- a/src/hooks/useAccountBalance.tsx +++ b/src/hooks/useAccountBalance.tsx @@ -30,7 +30,7 @@ const useAccountBalanceContext = () => { const { evmAddress, DoraAddress, getAccountBalance } = useAccounts(); const canAccountMigrate = useSelector(calculateCanAccountMigrate); - console.log(`ETH dydx contract address is ${import.meta.env.VITE_ETH_DORA_ADDRESSS}`) + console.log(`ETH dora contract address is ${import.meta.env.VITE_ETH_DORA_ADDRESSS}`) console.log(`query evmAddress is ${evmAddress}`) console.log(`是否可以进行账户迁移${canAccountMigrate}`) console.log(`chain id is ${Number(import.meta.env.VITE_ETH_CHAIN_ID)}`) diff --git a/src/hooks/usePendingMigrationsData.tsx b/src/hooks/usePendingMigrationsData.tsx index 472a66f..5924a6c 100644 --- a/src/hooks/usePendingMigrationsData.tsx +++ b/src/hooks/usePendingMigrationsData.tsx @@ -123,7 +123,7 @@ export const usePendingMigrationsData = ({ enabled: filter === PendingMigrationFilter.Mine && Boolean(evmAddress), }); - console.log(evmUserRecords); + console.log(`当前用户的Record记录为${evmUserRecords}`); useEffect(() => { if (error) { @@ -147,7 +147,7 @@ export const usePendingMigrationsData = ({ console.log(`transformedEVMUserRecords is ${transformedEVMUserRecords}`); - if (filter === PendingMigrationFilter.Mine && evmAddress && transformedUserRecords.length) { + if (filter === PendingMigrationFilter.Mine && evmAddress) { setFilteredPendingMigrations(transformedEVMUserRecords); } else { const searchFilter = addressSearchFilter.trim().toLowerCase(); diff --git a/src/lib/wagmi.ts b/src/lib/wagmi.ts index 2b0eb82..c371d97 100644 --- a/src/lib/wagmi.ts +++ b/src/lib/wagmi.ts @@ -38,27 +38,6 @@ const injectedConnectorOptions = { }, }; -const walletconnect2ConnectorOptions: ConstructorParameters[0] = { - chains, - options: { - projectId: import.meta.env.VITE_WALLETCONNECT2_PROJECT_ID, - metadata: { - name: 'dYdX', - description: '', - url: import.meta.env.VITE_BASE_URL, - icons: [`${import.meta.env.VITE_BASE_URL}/cbw-image.png}`], - }, - showQrModal: true, - qrModalOptions: { - themeMode: 'dark' as const, - themeVariables: { - '--wcm-accent-color': '#5973fe', - '--wcm-font-family': 'var(--fontFamily-base)', - }, - explorerRecommendedWalletIds: WALLET_CONNECT_EXPLORER_RECOMMENDED_IDS, - }, - }, -}; const connectors = [ new MetaMaskConnector({ @@ -67,14 +46,6 @@ const connectors = [ shimDisconnect: true, }, }), - new CoinbaseWalletConnector({ - chains, - options: { - appName: 'dYdX', - reloadOnDisconnect: false, - }, - }), - new WalletConnectConnector(walletconnect2ConnectorOptions), new InjectedConnector(injectedConnectorOptions), ]; @@ -96,18 +67,6 @@ const createInjectedConnectorWithProvider = (provider: ExternalProvider) => provider as unknown as Awaited>; })(injectedConnectorOptions) as InjectedConnector; -const createWalletConnect2ConnectorWithId = (walletconnect2Id: string) => - new WalletConnectConnector({ - ...walletconnect2ConnectorOptions, - options: { - ...walletconnect2ConnectorOptions.options, - qrModalOptions: { - ...walletconnect2ConnectorOptions.options.qrModalOptions, - explorerRecommendedWalletIds: [walletconnect2Id], - explorerExcludedWalletIds: 'ALL', - }, - }, - }); // Custom connector from wallet selection import { @@ -131,7 +90,5 @@ export const resolveWagmiConnector = ({ return walletConnection.type === WalletConnectionType.InjectedEip1193 && walletConnection.provider ? createInjectedConnectorWithProvider(walletConnection.provider) - : walletConnection.type === WalletConnectionType.WalletConnect2 && walletConfig.walletconnect2Id - ? createWalletConnect2ConnectorWithId(walletConfig.walletconnect2Id) : connectors.find(({ id }: { id: string }) => id === walletConnectionConfig.wagmiConnectorId); }; diff --git a/src/lib/wallet/index.ts b/src/lib/wallet/index.ts index f592414..a34b888 100644 --- a/src/lib/wallet/index.ts +++ b/src/lib/wallet/index.ts @@ -52,24 +52,6 @@ export const getWalletConnection = ({ break; } - - case WalletConnectionType.WalletConnect2: { - return { - type: WalletConnectionType.WalletConnect2, - }; - } - - case WalletConnectionType.CoinbaseWalletSdk: { - return { - type: WalletConnectionType.CoinbaseWalletSdk, - }; - } - - case WalletConnectionType.CosmosSigner: { - return { - type: WalletConnectionType.CosmosSigner, - }; - } } } }; diff --git a/src/views/MigrateForm/PreviewStep/MigrateFormPreviewStep.tsx b/src/views/MigrateForm/PreviewStep/MigrateFormPreviewStep.tsx index e47a924..b47a761 100644 --- a/src/views/MigrateForm/PreviewStep/MigrateFormPreviewStep.tsx +++ b/src/views/MigrateForm/PreviewStep/MigrateFormPreviewStep.tsx @@ -65,7 +65,6 @@ export const MigrateFormPreviewStep = () => { { key: 'dydx_settlement', label: 'Dora Vota settlement', - // tooltip: 'dydx-chain-settlement', value: ( ~40 hours diff --git a/src/views/dialogs/OnboardingDialog/ChooseWallet.tsx b/src/views/dialogs/OnboardingDialog/ChooseWallet.tsx index 1767186..c24b28b 100644 --- a/src/views/dialogs/OnboardingDialog/ChooseWallet.tsx +++ b/src/views/dialogs/OnboardingDialog/ChooseWallet.tsx @@ -15,8 +15,6 @@ import { Button } from '@/components/Button'; import { Icon } from '@/components/Icon'; import { Link } from '@/components/Link'; -const aboutWalletsLink = `https://www.dydx.academy/video/defi-wallet`; - export const ChooseWallet = () => { const stringGetter = useStringGetter(); @@ -48,12 +46,6 @@ export const ChooseWallet = () => { ))} - - - - About wallets - - ); };