-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added generated code for PoolzBack (#128)
Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
8567669
commit 7ddc8db
Showing
5 changed files
with
193 additions
and
172 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "FinishPool", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "Investor_ID", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "Investor_Address", "type": "address" } ], "name": "NewInvestorEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "NewPool", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "PoolUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "Amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "From", "type": "address" }, { "indexed": false, "internalType": "address", "name": "Token", "type": "address" } ], "name": "TransferIn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "Amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "From", "type": "address" } ], "name": "TransferInETH", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "Amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "To", "type": "address" }, { "indexed": false, "internalType": "address", "name": "Token", "type": "address" } ], "name": "TransferOut", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "Amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "To", "type": "address" } ], "name": "TransferOutETH", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "Benefit_Address", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "address", "name": "_Token", "type": "address" }, { "internalType": "uint256", "name": "_FinishTime", "type": "uint256" }, { "internalType": "uint256", "name": "_Rate", "type": "uint256" }, { "internalType": "uint256", "name": "_POZRate", "type": "uint256" }, { "internalType": "uint256", "name": "_StartAmount", "type": "uint256" }, { "internalType": "uint64", "name": "_LockedUntil", "type": "uint64" }, { "internalType": "address", "name": "_MainCoin", "type": "address" }, { "internalType": "bool", "name": "_Is21Decimal", "type": "bool" }, { "internalType": "uint256", "name": "_Now", "type": "uint256" }, { "internalType": "uint256", "name": "_WhiteListId", "type": "uint256" } ], "name": "CreatePool", "outputs": [], "stateMutability": "payable", "type": "function", "payable": true }, { "inputs": [], "name": "Fee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "GetInvestmentData", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "GetMyInvestmentIds", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "GetMyPoolsId", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_Id", "type": "uint256" } ], "name": "GetPoolBaseData", "outputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_Id", "type": "uint256" } ], "name": "GetPoolExtraData", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_Id", "type": "uint256" } ], "name": "GetPoolMoreData", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "GetPoolStatus", "outputs": [ { "internalType": "enum PoolsData.PoolStatus", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "GovernerContract", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_PoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_Amount", "type": "uint256" } ], "name": "InvestERC20", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_PoolId", "type": "uint256" } ], "name": "InvestETH", "outputs": [], "stateMutability": "payable", "type": "function", "payable": true }, { "inputs": [ { "internalType": "address", "name": "_address", "type": "address" } ], "name": "IsERC20Maincoin", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "IsPayble", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "IsReadyWithdrawInvestment", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_PoolId", "type": "uint256" } ], "name": "IsReadyWithdrawLeftOvers", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "IsTokenFilterOn", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "address", "name": "_address", "type": "address" } ], "name": "IsValidToken", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "MCWhitelistId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "MaxDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "MaxETHInvest", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "MinDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "MinETHInvest", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "PoolPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "PozFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "PozTimer", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "address", "name": "_benefitAddress", "type": "address" } ], "name": "SetBenefit_Address", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fee", "type": "uint256" } ], "name": "SetFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_minDuration", "type": "uint256" }, { "internalType": "uint256", "name": "_maxDuration", "type": "uint256" } ], "name": "SetMinMaxDuration", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_MinETHInvest", "type": "uint256" }, { "internalType": "uint256", "name": "_MaxETHInvest", "type": "uint256" } ], "name": "SetMinMaxETHInvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fee", "type": "uint256" } ], "name": "SetPOZFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_PoolPrice", "type": "uint256" } ], "name": "SetPoolPrice", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pozTimer", "type": "uint256" } ], "name": "SetPozTimer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_WhiteList_Address", "type": "address" } ], "name": "SetWhiteList_Address", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "SwapTokenFilter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "SwitchIsPayble", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "TokenWhitelistId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "WhiteList_Address", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "WithdrawInvestment", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_PoolId", "type": "uint256" } ], "name": "WithdrawLeftOvers", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getTotalInvestor", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "isPoolLocked", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "poolsCount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "constant": true }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_address", "type": "address" } ], "name": "setGovernerContract", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_whiteListId", "type": "uint256" } ], "name": "setMCWhitelistId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_whiteListId", "type": "uint256" } ], "name": "setTokenWhitelistId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive", "payable": true }, { "inputs": [ { "internalType": "address payable", "name": "_to", "type": "address" } ], "name": "WithdrawETHFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_Token", "type": "address" }, { "internalType": "address", "name": "_to", "type": "address" } ], "name": "WithdrawERC20Fee", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using System.Collections.Generic; | ||
using System.Numerics; | ||
using Nethereum.Hex.HexTypes; | ||
using Nethereum.ABI.FunctionEncoding.Attributes; | ||
using Nethereum.Web3; | ||
using Nethereum.RPC.Eth.DTOs; | ||
using Nethereum.Contracts.CQS; | ||
using Nethereum.Contracts.ContractHandlers; | ||
using Nethereum.Contracts; | ||
using System.Threading; | ||
using poolz.finance.csharp.contracts.PoolzBack.ContractDefinition; | ||
|
||
namespace poolz.finance.csharp.contracts.PoolzBack | ||
{ | ||
public partial class PoolzBackDeployingService | ||
{ | ||
public virtual Task<TransactionReceipt> DeployContractAndWaitForReceiptAsync(Nethereum.Web3.IWeb3 web3, PoolzBackDeployment poolzBackDeployment, CancellationTokenSource cancellationTokenSource = null) | ||
{ | ||
return web3.Eth.GetContractDeploymentHandler<PoolzBackDeployment>().SendRequestAndWaitForReceiptAsync(poolzBackDeployment, cancellationTokenSource); | ||
} | ||
|
||
public virtual Task<string> DeployContractAsync(Nethereum.Web3.IWeb3 web3, PoolzBackDeployment poolzBackDeployment) | ||
{ | ||
return web3.Eth.GetContractDeploymentHandler<PoolzBackDeployment>().SendRequestAsync(poolzBackDeployment); | ||
} | ||
|
||
public virtual async Task<PoolzBackService> DeployContractAndGetServiceAsync(Nethereum.Web3.IWeb3 web3, PoolzBackDeployment poolzBackDeployment, CancellationTokenSource cancellationTokenSource = null) | ||
{ | ||
var receipt = await DeployContractAndWaitForReceiptAsync(web3, poolzBackDeployment, cancellationTokenSource); | ||
return new PoolzBackService(web3, receipt.ContractAddress); | ||
} | ||
} | ||
} |
Oops, something went wrong.