This repository was archived by the owner on Dec 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,21 @@ export class DataUnion {
467467 return tx . wait ( )
468468 }
469469
470+ /**
471+ * Transfer amount to specific member in DataunionSidechain
472+ * @param memberAddress - the other member who gets their tokens out of the Data Union
473+ * @param amountTokenWei - the amount that want to add to the member
474+ * @returns receipt once transfer transaction is confirmed
475+ */
476+ async transferToMemberInContract (
477+ memberAddress : EthereumAddress ,
478+ amountTokenWei : BigNumber | number | string
479+ ) : Promise < TransactionResponse > {
480+ const address = getAddress ( memberAddress ) // throws if bad address
481+ const duSidechain = await this . getContracts ( ) . getSidechainContract ( this . contractAddress )
482+ return duSidechain . transferToMemberInContract ( address , amountTokenWei )
483+ }
484+
470485 /**
471486 * Create a new DataUnionMainnet contract to mainnet with DataUnionFactoryMainnet
472487 * This triggers DataUnionSidechain contract creation in sidechain, over the bridge (AMB)
Original file line number Diff line number Diff line change @@ -125,6 +125,15 @@ export const dataUnionSidechainABI = [{
125125 ] ,
126126 anonymous : false ,
127127 type : 'event'
128+ } , {
129+ name : 'transferToMemberInContract' ,
130+ inputs : [
131+ { name : 'recipient' , type : 'address' , internalType : 'address' } ,
132+ { name : 'amount' , type : 'uint256' , internalType : 'uint256' }
133+ ] ,
134+ outputs : [ ] ,
135+ stateMutability : 'nonpayable' ,
136+ type : 'function'
128137} ]
129138
130139// Only the part of ABI that is needed by deployment (and address resolution)
You can’t perform that action at this time.
0 commit comments