// This file was generated by the FCT compiler. Happy coding! ✨;
import { UNISWAP, TOKEN_VALIDATOR, Config } from "@kiroboio/fct-core";
import { create } from "@kiroboio/fct-builder";
/Chain: mainnet/
const CHAIN = "1";
const MY_VAULT = "0xEB31ba5241aeADfDb0134642993F30C2D9dB6D5B";
const MY_WALLET = "0xB2D2b108D5Ae62806346eA0B8Ba874777dC0b241";
const fct = create({
chain: CHAIN,
});
const uniswap_swap_noSlippageProtection_0 = fct.add(
UNISWAP.getters.swap_noSlippageProtection,
{
to: "0x7501Ac7b420eF83e856dCD432aa5b81F5e65B292",
addressIn: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
amountIn: "1000000000000000000",
addressOut: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
amountOut: "1853299209",
isExactIn: true,
methodParams: {
amount: "1000000000000000000",
method: "swap ETH for Tokens",
path: [
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
],
},
}
);
const token_validator_greaterThan_1 = fct.add(
TOKEN_VALIDATOR.getters.greaterThan,
{
to: "0x421AC2A90550942ABB532e06d1d4d5220c095777",
methodParams: {
amount1: uniswap_swap_noSlippageProtection_0.outputs.amountOut,
decimals1: "6",
amount2: "1850000000000000000000",
decimals2: "18",
decimalsOut: "6",
},
}
);
fct.startWith(
uniswap_swap_noSlippageProtection_0.then(token_validator_greaterThan_1)
);
const config: Config = {
// Config your FCT here!
};
fct.compile(config).then((tx) => {
/*This (tx) is your compiled fct-transaction, and you can publish it to the FCTService
and we will execute it for you when the time comes,
or you can execute it yourself using the FCT SDK*/
});
// This file was generated by the FCT compiler. Happy coding! ✨;
import { UNISWAP, TOKEN_VALIDATOR, ERC20, Config } from "@kiroboio/fct-core";
import { create } from "@kiroboio/fct-builder";
/Chain: mainnet/
const CHAIN = "1";
const MY_VAULT = "0xEB31ba5241aeADfDb0134642993F30C2D9dB6D5B";
const MY_WALLET = "0xB2D2b108D5Ae62806346eA0B8Ba874777dC0b241";
const fct = create({
chain: CHAIN,
});
const uniswap_simulateSwap_0 = fct.add(UNISWAP.getters.simulateSwap, {
to: "0x7501Ac7b420eF83e856dCD432aa5b81F5e65B292",
addressIn: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
amountIn: "1000000000000000000",
addressOut: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
amountOut: "1852292480",
isExactIn: true,
methodParams: {
amount: "1000000000000000000",
method: "swap ETH for Tokens",
path: [
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
],
},
});
const token_validator_lessThan_1 = fct.add(TOKEN_VALIDATOR.getters.lessThan, {
to: "0x421AC2A90550942ABB532e06d1d4d5220c095777",
methodParams: {
amount1: uniswap_simulateSwap_0.outputs.amountOut,
decimals1: "6",
amount2: "1600000000000000000000",
decimals2: "18",
decimalsOut: "6",
},
});
const erc20_balanceOf_2 = fct.add(ERC20.getters.balanceOf, {
to: "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
methodParams: {
owner: MY_VAULT,
},
});
const uniswap_simpleRemoveLiquidity_3 = fct.add(
UNISWAP.actions.simpleRemoveLiquidity,
{
to: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
methodParams: {
tokenA: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
tokenB: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
liquidity: erc20_balanceOf_2.outputs.balance,
to: MY_VAULT,
deadline: {
type: "global",
id: "blockTimestamp",
},
},
}
);
fct.startWith(
uniswap_simulateSwap_0.then(
token_validator_lessThan_1.then(
erc20_balanceOf_2.then(uniswap_simpleRemoveLiquidity_3)
)
)
);
const config: Config = {
// Config your FCT here!
};
fct.compile(config).then((tx) => {
/*This (tx) is your compiled fct-transaction, and you can publish it to the FCTService
and we will execute it for you when the time comes,
or you can execute it yourself using the FCT SDK*/
});
// This file was generated by the FCT compiler. Happy coding! ✨;
import { UTILITY, ERC20, TOKEN_MATH, Config } from "@kiroboio/fct-core";
import { create } from "@kiroboio/fct-builder";
/Chain: mainnet/
const CHAIN = "1";
const MY_VAULT = "0xEB31ba5241aeADfDb0134642993F30C2D9dB6D5B";
const MY_WALLET = "0xB2D2b108D5Ae62806346eA0B8Ba874777dC0b241";
const fct = create({
chain: CHAIN,
});
const utility_sendETH_0 = fct.add(UTILITY.actions.sendETH, {
to: MY_WALLET,
value: "1000000000000000000",
});
const erc20_balanceOf_1 = fct.add(ERC20.getters.balanceOf, {
to: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
methodParams: {
owner: MY_VAULT,
},
});
const token_math_div_2 = fct.add(TOKEN_MATH.getters.div, {
to: "0x9b2343DF3d4b30b0Fed3C2105C094a76288defCB",
methodParams: {
amount1: erc20_balanceOf_1.outputs.balance,
decimals1: "6",
amount2: "2000000000000000000",
decimals2: "18",
decimalsOut: "6",
},
});
const erc20_simpleTransfer_3 = fct.add(ERC20.actions.simpleTransfer, {
to: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
methodParams: {
from: MY_VAULT,
to: MY_WALLET,
amount: token_math_div_2.outputs.result,
},
});
const erc20_simpleTransfer_4 = fct.add(ERC20.actions.simpleTransfer, {
to: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
methodParams: {
from: MY_VAULT,
to: MY_WALLET,
amount: token_math_div_2.outputs.result,
},
});
fct.startWith(
utility_sendETH_0.then(
erc20_balanceOf_1.then(
token_math_div_2.then(erc20_simpleTransfer_3.then(erc20_simpleTransfer_4))
)
)
);
const config: Config = {
// Config your FCT here!
};
fct.compile(config).then((tx) => {
/*This (tx) is your compiled fct-transaction, and you can publish it to the FCTService
and we will execute it for you when the time comes,
or you can execute it yourself using the FCT SDK*/
});
// This file was generated by the FCT compiler. Happy coding! ✨;
import { AAVE, TOKEN_VALIDATOR, Config } from "@kiroboio/fct-core";
import { create } from "@kiroboio/fct-builder";
/Chain: mainnet/
const CHAIN = "1";
const MY_VAULT = "0xEB31ba5241aeADfDb0134642993F30C2D9dB6D5B";
const MY_WALLET = "0xB2D2b108D5Ae62806346eA0B8Ba874777dC0b241";
const fct = create({
chain: CHAIN,
});
const aave_getUserAccountData_0 = fct.add(AAVE.getters.getUserAccountData, {
to: "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
methodParams: {
user: MY_VAULT,
},
});
const token_validator_lessThan_1 = fct.add(TOKEN_VALIDATOR.getters.lessThan, {
to: "0x421AC2A90550942ABB532e06d1d4d5220c095777",
methodParams: {
amount1: aave_getUserAccountData_0.outputs.healthFactor,
decimals1: "18",
amount2: "1050000000000000000",
decimals2: "18",
decimalsOut: "18",
},
});
fct.startWith(aave_getUserAccountData_0.then(token_validator_lessThan_1));
const config: Config = {
// Config your FCT here!
};
fct.compile(config).then((tx) => {
/*This (tx) is your compiled fct-transaction, and you can publish it to the FCTService
and we will execute it for you when the time comes,
or you can execute it yourself using the FCT SDK*/
});
Smart contracts are made up of three main parts: Assets, Data, and Logic. If you separate the Logic part and use it at the transaction level, you won’t have to rely so much on complex smart contracts. As a result, it will be faster and simpler to create new products.
The Smart Transaction SDK tool lets you create blockchain apps more quickly and easily.
Quickly build a Smart Transaction Prototype to test your product concept before development.
Set up real-time alerts for any Smart Contract notifications you choose.
A pre-built blockchain development environment that frees you to focus on your product’s logic.
Simulate your smart transaction on the blockchain, to ensure that all conditions you set are met.