depositEthFromUser

function depositEthFromUser(
    uint256 _domainId,
    uint256 _destinationChainId,
    string memory _destinationAccount,
    uint256 _amountEthMin
)payable external nonReentrant

λΈŒλ¦Ώμ§€ 코인 μž…κΈˆ(κ΅ν™˜), μ˜€λ¦¬μ§€λ„ 코인에 λŒ€ν•œ 처리

Parameters

TypeValueDescription

uint256

_domainId

도메인ID

uint256

_destinationChainId

λͺ©μ μ§€ ChainId

string

_destinateionAccount

수령 EOA

uint256

_amountMin

λ³€κ²½ ν•  μ΅œμ†Œ μˆ˜λŸ‰

β€» μ΅œμ†Œ μˆ˜λŸ‰μ— λŒ€ν•΄μ„œλŠ” ν˜„μž¬ μ‚¬μš©ν•˜μ§€ μ•ŠμŒ (0)

Example

const overrides = {
    gasLimit: 9999999,
    value:ethers.utils.parseEther("50")    // μž…κΈˆ μˆ˜λŸ‰
}

await paggedChainAContract.connect(accounts[0]).depositEthFromUser(
    DOMAIN_ID_1,
    CHAIN_ID_B, 
    accounts[1].address,
    overrides
)

2023.05.25

Last updated