implement deposit ether for pos
MODIFY
src/plasma/erc20.ts
src/plasma/erc20.ts
@@ -94,6 +94,8 @@ export class ERC20 extends PlasmaToken {
}
depositEther(amount: TYPE_AMOUNT, option: ITransactionOption = {}) {
+ this.checkForRoot_("depositEther");
+
return this.contracts_.depositManager.getContract().then(contract => {
option.value = Converter.toHex(amount);
const method = contract.method(

MODIFY
src/pos/erc20.ts
src/pos/erc20.ts
@@ -103,6 +103,16 @@ export class ERC20 extends POSToken {
);
}
+ depositEther(amount: TYPE_AMOUNT, option: ITransactionOption = {}) {
+ this.checkForRoot_("depositEther");
+
+
+ option.value = Converter.toHex(amount);
+ return this.rootChainManager.method("depositEtherFor").then(method => {
+ return this.processWrite(method, option);
+ });
+ }
+
/**
* initiate withdraw by burning provided amount
*

implement deposit ether for pos