randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
81 lines (80 loc) • 5.37 kB
TypeScript
import { ContractFactory, ContractTransactionResponse } from "ethers";
import type { Signer, AddressLike, ContractDeployTransaction, ContractRunner } from "ethers";
import type { NonPayableOverrides } from "../common";
import type { MockRandomnessReceiver, MockRandomnessReceiverInterface } from "../MockRandomnessReceiver";
type MockRandomnessReceiverConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
export declare class MockRandomnessReceiver__factory extends ContractFactory {
constructor(...args: MockRandomnessReceiverConstructorParams);
getDeployTransaction(randomnessSender: AddressLike, overrides?: NonPayableOverrides & {
from?: string;
}): Promise<ContractDeployTransaction>;
deploy(randomnessSender: AddressLike, overrides?: NonPayableOverrides & {
from?: string;
}): Promise<MockRandomnessReceiver & {
deploymentTransaction(): ContractTransactionResponse;
}>;
connect(runner: ContractRunner | null): MockRandomnessReceiver__factory;
static readonly bytecode = "0x60a060405234801561000f575f5ffd5b5060405161042638038061042683398101604081905261002e916100b0565b806001600160a01b03811661009e5760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f7420736574207a65726f20616464726573732061732072616e646f60448201526b36b732b9b99039b2b73232b960a11b606482015260840160405180910390fd5b6001600160a01b0316608052506100dd565b5f602082840312156100c0575f5ffd5b81516001600160a01b03811681146100d6575f5ffd5b9392505050565b6080516103246101025f395f818160ad0152818161010c015261022601526103245ff3fe608060405234801561000f575f5ffd5b5060043610610063575f3560e01c8063431ac6571161004d578063431ac6571461008b578063837e7cc6146100a0578063df3fafe8146100a8575f5ffd5b80626d6cae146100675780633601318914610083575b5f5ffd5b61007060015481565b6040519081526020015b60405180910390f35b6100705f5481565b61009e6100993660046102b7565b6100f4565b005b61009e6101a6565b6100cf7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161007a565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4f6e6c792072616e646f6d6e65737353656e6465722063616e2063616c6c000060448201526064015b60405180910390fd5b6101a282826101b3565b5050565b6101ae610223565b600155565b816001541461021e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f52657175657374204944206d69736d6174636800000000000000000000000000604482015260640161018f565b5f5550565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f8413b076040518163ffffffff1660e01b81526004016020604051808303815f875af115801561028e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102b291906102d7565b905090565b5f5f604083850312156102c8575f5ffd5b50508035926020909101359150565b5f602082840312156102e7575f5ffd5b505191905056fea2646970667358221220e3dc079a3a90b9d3908b9f60d311360e8849c23b3a4dcef80857bcb15237404d64736f6c634300081c0033";
static readonly abi: readonly [{
readonly type: "constructor";
readonly inputs: readonly [{
readonly name: "randomnessSender";
readonly type: "address";
readonly internalType: "address";
}];
readonly stateMutability: "nonpayable";
}, {
readonly type: "function";
readonly name: "randomness";
readonly inputs: readonly [];
readonly outputs: readonly [{
readonly name: "";
readonly type: "bytes32";
readonly internalType: "bytes32";
}];
readonly stateMutability: "view";
}, {
readonly type: "function";
readonly name: "randomnessSender";
readonly inputs: readonly [];
readonly outputs: readonly [{
readonly name: "";
readonly type: "address";
readonly internalType: "contract IRandomnessSender";
}];
readonly stateMutability: "view";
}, {
readonly type: "function";
readonly name: "receiveRandomness";
readonly inputs: readonly [{
readonly name: "requestID";
readonly type: "uint256";
readonly internalType: "uint256";
}, {
readonly name: "randomness";
readonly type: "bytes32";
readonly internalType: "bytes32";
}];
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
}, {
readonly type: "function";
readonly name: "requestId";
readonly inputs: readonly [];
readonly outputs: readonly [{
readonly name: "";
readonly type: "uint256";
readonly internalType: "uint256";
}];
readonly stateMutability: "view";
}, {
readonly type: "function";
readonly name: "rollDice";
readonly inputs: readonly [];
readonly outputs: readonly [];
readonly stateMutability: "nonpayable";
}];
static createInterface(): MockRandomnessReceiverInterface;
static connect(address: string, runner?: ContractRunner | null): MockRandomnessReceiver;
}
export {};