This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="MsoNormal"> | |
<span lang="EN-US"><span style="position:relative;top:12.0pt"><img width="45" height="41" src="test12_files/image002.gif" v:shapes="_x0000_i1025" /></span><m:math style="background-color:#"> | |
<m:semantics> | |
<m:mi>,</m:mi> | |
<m:annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=feaagCart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHbl7mZLdGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabauaakeaaiuaajugubabaaaaaaaaapeGaa8hd=daa@4198@</m:annotation> | |
</m:semantics> | |
</m:math><span style="position:relative;top:6.0pt"><img width="43" height="24" src="test12_files/image004.gif" v:shapes="_x0000_i1026" /></span><m:math style="background-color:#"> | |
<m:semantics> | |
<m:mi>,</m:mi> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use latest'; | |
var request = require('request@2.56.0'); | |
var xmlbuilder = require('xmlbuilder@2.6.4'); | |
module.exports = function(context, req, res) { | |
request({ | |
method: 'GET', | |
uri: 'https://api.topcoder.com/v2/challenges/active?review=COMMUNITY,INTERNAL&type=develop' | |
}, function(error, response, body) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await wallet.approveTokenDeposit(depositAmount, tokenInfo.symbol); | |
await wallet.completeTokenDeposit(depositAmount, tokenInfo.symbol); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//approve the deposit amount for the ClientFund contract | |
await wallet.approveTokenDeposit(depositAmount, tokenInfo.symbol); | |
//deposit to the ClientFund contract | |
await wallet.completeTokenDeposit(depositAmount, tokenInfo.symbol); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//specify the currency, amount and the recipient address | |
const payMonetaryAmount = nahmii.MonetaryAmount.from({ | |
currency: { | |
ct: tokenInfo.currency, | |
id: '0' | |
}, | |
amount: ethers.utils.parseUnits(payAmount, tokenInfo.decimals) | |
}); | |
const payment = new nahmii.Payment(payMonetaryAmount, wallet.address, recipientAddress, wallet); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await settlementFactory.calculateRequiredSettlements(wallet.address, stageMonetaryAmount); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const settlements = await settlementFactory.getAllSettlements(wallet.address, tokenInfo.currency); | |
//settlement.type indicates which type the settlement is. | |
//settlement.isStageable indicates if the settlement is qualified and ready to be staged (marked as completed) | |
//settlement.isOngoing indicates if the settlement is still within the challenge period. | |
//settlement.expirationTime indicates the end time of the challenge period. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {hash} = await settlement.start(wallet, {gasLimit, gasPrice}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const settlements = await settlementFactory.calculateRequiredSettlements(wallet.address, stageMonetaryAmount); | |
for (const settlement of settlements) { | |
const {hash} = await settlement.start(wallet, {gasLimit, gasPrice}); | |
//wait until the transaction is mined on chain | |
await provider.getTransactionConfirmation(hash); | |
} |
OlderNewer