Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 2x 2x 2x 2x 1x | import { Client as SAC } from "sac-sdk";
import { FakeSAC } from "../fake-sac/fake-sac";
import type { Pass } from "../pass/pass.interface";
import type { AssembledTransaction } from "@stellar/stellar-sdk/contract";
export class Transfer {
constructor(
private readonly _from: string,
private readonly _to: string,
private readonly _amount: bigint,
private readonly _token: SAC | FakeSAC
) { }
async value(withPass: Pass): Promise<AssembledTransaction<null>> {
return await withPass.applyTo(await this._token.transfer({
from: this._from,
to: this._to,
amount: this._amount,
}));
}
}
|