GithubHelp home page GithubHelp logo

paintswap / estfor-contracts Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 7.0 11.7 MB

Estfor Kingdom game smart contracts

Home Page: https://estfor.com

Solidity 28.04% TypeScript 71.95% Shell 0.01% JavaScript 0.01%
brush fantom gamefi solidity typescript

estfor-contracts's People

Contributors

0xsamwitch avatar doublesharp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

estfor-contracts's Issues

Add private key to hardhat accounts in config and remove all explicit .connects

When forking with npx hardhat node --fork https://.... it currently uses the default hardhat accounts, this causes problems if we want to impersonate the owner for upgrades. Current we use getImpersonatedSigner and then pass the owner signer in various places through .connect, but I don't think this is necessary. Can set hardhat to use the owner as the default.

hardhat.config.ts

const hardhatAccounts: HardhatNetworkAccountUserConfig[] = [
  {
    privateKey: process.env.PRIVATE_KEY as string,
    balance: ethers.parseEther("100000").toString(),
  },
];

Add accounts here:

    hardhat: {
      gasPrice: 0,
      initialBaseFeePerGas: 0,
      allowUnlimitedContractSize: true,
      accounts: hardhatAccounts,
    }

But thought needs to be put into running the tests and deployment on CI as it would then use them too, hmm

Update start of scripts to be consistent

Most scripts begin with something like this:

const [owner] = await ethers.getSigners();
console.log(`Deploying upgradeable contracts with the account: ${owner.address}`);

const network = await ethers.provider.getNetwork();
console.log(`ChainId: ${network.chainId}`);

But we could console.log in one line with this:

const [owner] = await ethers.getSigners();
const network = await ethers.provider.getNetwork();
console.log(`Deploying instant actions using account: ${owner.address} on chain id ${network.chainId}`);

Edit: Actually this might work:

const [owner] = await ethers.getSigners();
console.log(`Deploying instant actions using account: ${owner.address} on chain id ${await owner.getChainId()}`);

Remaining tasks for Alpha

  • Hook in chainlink oracles properly
  • Replace all requires with revert and custom error
  • Change all mentions of tokenId in Players to playerId
  • Add boost vial test
  • Use defence combat skill
  • Test for health point
  • More combat tests
  • Add level up rewards to pending output.
  • When consuming actions, also retrieve any random rewards for previous actions.
  • Go through all integer casts and check if they are necessary
  • Rename rate in pending
  • Make sure there are never errors thrown when processing actions
  • Rename itemTokenIdRangeMin/Max to include hand
  • Deployment test script, add combat
  • Include updated total xp reward items
  • Check speed multiplier is working correctly with past random loot items
  • Is minSkillPoints used correctly in places where there are no minimum equipment items.
  • minSkillPoints test for consumeables, attire and left/right hand equipment. Actions and action choices too
  • Full equipment bonuses
  • Map skill points to level in uri.
  • Check for re-entrancies (especially when minting)
  • Go through all the comments and check if they are still relevant
  • Fix solidity compiler warnings
  • Reuse some code from pendingRewards and processActions
  • Check storage slots are actually packed as expected
  • Is equip position correct for attire?
  • Upgrade to solidity 0.8.19
  • Convert for loops to while or do-while with unchecked increments
  • Use unsafe array access
  • Use new combat system
  • Implement ERC2981 and buy brush on the backend and send to the pool
  • Update names of item/player NFTs when they are launched
  • Update alpha whitelist to 2 mints per account
  • Make alpha whitelist players non-transferable (Not done)
  • Add require around brush transfer (e.g in RoyaltyReceiver)
  • Add nft vault check in alpha whitelist
  • Add shield test and check it is only equippable in left hand (and others only in right hand)
  • Daily/Weekly rewards
  • Discount on xp boosts for the first X weeks
  • Use non-transferable SoulBound ERC? (No clue EIP to use)
  • Use revertedWithCustomError in all tests with the appropriate custom error message
  • Create some re-usable objects in Players.ts tests
  • May need to move all error inside PlayerBase.sol
  • Use new npm definition library
  • Cooking success rate
  • Thieving success rate
  • Add CI
  • Beardie holder discount (Not doing)
  • Add admin whitelist
  • Give some characters extra skills
  • Verify contracts in deployment script
  • ProcessActions should fail if there are no actions to do
  • Add alpha whitelist
  • Use names of NFTs with (ALPHA)
  • Update boots to feet
  • Enable full attire bonuses once all items are added
  • Change max food and scrolls that can be consumed to 65536?
  • Make sure unused dynamic actions are not available to be used
  • Minting a new active player while an existing one has actions queued is not working.
  • Check XP boosts can be liquidated.
  • A test when maxing out XP (overflowing)
  • Combine some world.*() functions together to reduce calls
  • Some tests fail if they cross a UTC midnight boundary
  • Add a test which maxes out food/scrolls (scrolls not needed)
  • Add all shop items
  • Implement gathering boost
  • Add name to Item events
  • Use whitelist .json files from estfor-definitions lib
  • (bug) Combat not always using up food against high level enemies
  • Gathering boost random reward tests

During alpha

  • Thieving full set should give +3% reward chance
  • Add overall level to "name" in player metadata
  • Add external_uri to player url
  • Update liquidating logic, each item BRUSH allocation should be defined daily
  • Give each player permanent bonuses for their starting skills, 10%? and 5% if shared
  • Add multiple queued action checks with new pendingQueuedActionState

During beta

  • Check comment // TODO Update later to pendingRandomReward.elapsedTime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.