Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions boba_community/hc-twitter/contracts/AuthenticatedFaucet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ contract AuthenticatedFaucet is Ownable {
uint256 lastEpochStart;
uint256 amountClaimsInLastEpoch;
uint256 maxClaimsPerEpoch;
uint256 testnetETHPerClaim;
uint256 bobaTokenPerClaim;
uint256 public testnetETHPerClaim;
uint256 public bobaTokenPerClaim;

event GasClaimed(uint256 authorId);

Expand Down
8 changes: 8 additions & 0 deletions boba_community/hc-twitter/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ const config: HardhatUserConfig = {
url: 'https://goerli.boba.network',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
boba_bnb_testnet: {
url: 'https://testnet.bnb.boba.network',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
boba_avax_testnet: {
url: 'https://testnet.avax.boba.network/',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
boba_rinkeby: {
url: 'https://rinkeby.boba.network',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
Expand Down
40 changes: 40 additions & 0 deletions boba_community/hc-twitter/scripts/change_settings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import hre, { artifacts, ethers } from 'hardhat'
import { ContractFactory, providers, Wallet } from 'ethers'
// @ts-ignore
import TuringHelperFactoryJson from './abis/TuringHelperFactory.json'
import FaucetFactoryJson from '../artifacts/contracts/AuthenticatedFaucet.sol/AuthenticatedFaucet.json'
import { parseEther } from 'ethers/lib/utils'

const cfg = hre.network.config

async function main() {
const local_provider = new providers.JsonRpcProvider(cfg['url'])
const testPrivateKey = process.env.PRIVATE_KEY_FAUCET ?? '0x___________'
const testWallet = new Wallet(testPrivateKey, local_provider)

const faucetFactory = new ContractFactory(
FaucetFactoryJson.abi,
FaucetFactoryJson.bytecode,
testWallet
).attach('0x5f6D019832FA4522DB7b94A4fe0DDBb73212FAcE')
Comment thread
wsdt marked this conversation as resolved.

console.log("OWNER: ", await faucetFactory.owner())

/*const helperAddr = await faucetFactory.turingHelper()

const turingFactory = new ContractFactory(
TuringHelperFactoryJson.abi,
TuringHelperFactoryJson.bytecode,
testWallet
).attach(helperAddr)*/

const tx = await faucetFactory.setConfig('https://o9gvgzsjw5.execute-api.us-east-1.amazonaws.com/Prod/', 10,
Comment thread
wsdt marked this conversation as resolved.
ethers.utils.parseEther('2'), ethers.utils.parseEther('0.02'));
const res = await tx.wait()
console.log('updated config', res)
}

main().catch((error) => {
console.error(error)
process.exitCode = 1
})