All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.deplant.jacki.framework.template.GiverV2Template Maven / Gradle / Ivy

package tech.deplant.jacki.framework.template;

import com.fasterxml.jackson.core.JsonProcessingException;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import tech.deplant.jacki.framework.ContractAbi;
import tech.deplant.jacki.framework.Credentials;
import tech.deplant.jacki.framework.DeployHandle;
import tech.deplant.jacki.framework.Tvc;
import tech.deplant.jacki.framework.contract.GiverV2Contract;

/**
 * Java template class for deploy of GiverV2Contract contract for Everscale blockchain.
 */
public record GiverV2Template(ContractAbi abi, Tvc tvc) implements Template {
  public GiverV2Template(Tvc tvc) throws JsonProcessingException {
    this(DEFAULT_ABI(), tvc);
  }

  public static ContractAbi DEFAULT_ABI() throws JsonProcessingException {
    return ContractAbi.ofString("{\"header\":[\"time\",\"expire\"],\"functions\":[{\"name\":\"upgrade\",\"inputs\":[{\"name\":\"newcode\",\"type\":\"cell\"}],\"outputs\":[]},{\"name\":\"sendTransaction\",\"inputs\":[{\"name\":\"dest\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint128\"},{\"name\":\"bounce\",\"type\":\"bool\"}],\"outputs\":[]},{\"name\":\"getMessages\",\"inputs\":[],\"outputs\":[{\"name\":\"messages\",\"type\":\"tuple[]\",\"components\":[{\"name\":\"hash\",\"type\":\"uint256\"},{\"name\":\"expireAt\",\"type\":\"uint64\"}]}]},{\"name\":\"constructor\",\"inputs\":[],\"outputs\":[]}],\"events\":[],\"ABI version\":2}");
  }

  public DeployHandle prepareDeploy(int contextId, int workchainId,
      Credentials credentials) {
    Map initialDataFields = Map.of();
    Map params = Map.of();
    return new DeployHandle(GiverV2Contract.class, contextId, abi(), tvc(), workchainId, credentials, initialDataFields, params, null);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy