mirror of
https://github.com/vacp2p/swap-contracts-module.git
synced 2025-02-27 18:30:33 +00:00
Parameterize swap address
This commit is contained in:
parent
7c23fc1858
commit
5ca72cb10a
@ -30,9 +30,10 @@ task("setupSwap", "Setup Swap")
|
||||
});
|
||||
|
||||
task("signCheque", "Sign cheque")
|
||||
.addParam("swapaddress", "Address to Swap Contract (Assumed to belong to Alice)")
|
||||
.setAction(async taskArgs => {
|
||||
// TODO Argument, aliceSwapAddress
|
||||
var resp = await swap.signCheque();
|
||||
var resp = await swap.signCheque(taskArgs.swapaddress);
|
||||
console.log(JSON.stringify(resp));
|
||||
});
|
||||
|
||||
|
@ -23,6 +23,7 @@ var bobAddress = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8";
|
||||
var erc20address = "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853";
|
||||
var aliceSwapAddress = "0x94099942864EA81cCF197E9D71ac53310b1468D8";
|
||||
|
||||
// XXX Using swap-helpers and task for now, parameterize this etc
|
||||
// TODO This should be parameterized with arguments, so probably as a task or standalone script?
|
||||
async function main() {
|
||||
var swapAddress = aliceSwapAddress;
|
||||
|
@ -21,7 +21,7 @@ var bobAddress = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8";
|
||||
// XXX These change
|
||||
// TODO Parameterize
|
||||
var erc20address = "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853";
|
||||
var aliceSwapAddress = "0x94099942864EA81cCF197E9D71ac53310b1468D8";
|
||||
//var aliceSwapAddress = "0x94099942864EA81cCF197E9D71ac53310b1468D8";
|
||||
|
||||
async function setupSwap() {
|
||||
// Basic setup and definitions
|
||||
@ -94,9 +94,8 @@ async function setupSwap() {
|
||||
return resp;
|
||||
}
|
||||
|
||||
// TODO This should be parameterized with arguments, so probably as a task or standalone script?
|
||||
async function signCheque() {
|
||||
var swapAddress = aliceSwapAddress;
|
||||
async function signCheque(swapAddress) {
|
||||
var aliceSwapAddress = swapAddress;
|
||||
var beneficiary = bobAddress;
|
||||
var cumulativePayout = 500;
|
||||
var chainId = 31337;
|
||||
|
Loading…
x
Reference in New Issue
Block a user