diff --git a/contracts/scripts/generateTokenLinks.ts b/contracts/scripts/generateTokenLinks.ts index 581fbe46..334b83cf 100644 --- a/contracts/scripts/generateTokenLinks.ts +++ b/contracts/scripts/generateTokenLinks.ts @@ -45,11 +45,11 @@ async function main() { contentLines = content.split('\n'); } catch {} + const host = + env.network.name === 'localhost' ? 'http://localhost:5173' : `https://${env.network.name}.stratagems.world`; fs.writeFileSync( `.keys/${env.network.name}-list.csv`, - contentLines - .concat(accounts.map((v) => `${v.address},https://${env.network.name}.stratagems.world#tokenClaim=${v.key}`)) - .join('\n'), + contentLines.concat(accounts.map((v) => `${v.address},${host}#tokenClaim=${v.key}`)).join('\n'), ); const addresses = accounts.map((v) => v.address); diff --git a/docs/contracts/GemsGenerator.md b/docs/contracts/GemsGenerator.md index efb5a883..ca1510c9 100644 --- a/docs/contracts/GemsGenerator.md +++ b/docs/contracts/GemsGenerator.md @@ -47,6 +47,10 @@ claim the rewards earned so far using a fixed rate per point function claimFixedRewards(address to) +| Name | Description +| ---- | ----------- +| to | address to send the reward to + ### **claimSharedPoolRewards** claim the rewards earned so far in the shared pool @@ -57,6 +61,10 @@ claim the rewards earned so far in the shared pool function claimSharedPoolRewards(address to) +| Name | Description +| ---- | ----------- +| to | address to send the reward to + ### **decimals** Returns the number of decimals the token uses. @@ -77,6 +85,10 @@ The amount of reward an account has accrued so far. Does not include already wit function earnedFromFixedRate(address account) view returns (uint256) +| Name | Description +| ---- | ----------- +| account | address to query about + ### **earnedFromFixedRateMultipleAccounts** The amount of reward an account has accrued so far. Does not include already withdrawn rewards. @@ -87,6 +99,10 @@ The amount of reward an account has accrued so far. Does not include already wit function earnedFromFixedRateMultipleAccounts(address[] accounts) view returns (uint256[] result) +| Name | Description +| ---- | ----------- +| accounts | list of address to query about + ### **earnedFromPoolRate** The amount of reward an account has accrued so far. Does not include already withdrawn rewards. @@ -97,6 +113,10 @@ The amount of reward an account has accrued so far. Does not include already wit function earnedFromPoolRate(address account) view returns (uint256) +| Name | Description +| ---- | ----------- +| account | address to query about + ### **earnedFromPoolRateMultipleAccounts** The amount of reward an account has accrued so far. Does not include already withdrawn rewards. @@ -107,6 +127,39 @@ The amount of reward an account has accrued so far. Does not include already wit function earnedFromPoolRateMultipleAccounts(address[] accounts) view returns (uint256[] result) +| Name | Description +| ---- | ----------- +| accounts | list of address to query about + +### **enableGame** + +Allow a contract (a game) to add points to the rewards system + +*sig hash*: `0x16cf09f8` + +*Signature*: enableGame(address,uint256) + +function enableGame(address game, uint256 weight) + +| Name | Description +| ---- | ----------- +| game | the contract that is allowed to call in +| weight | (not implemented, act as boolean for now) (0 disable the game) + +### **games** + +return the weight of the game + +*sig hash*: `0x79131a19` + +*Signature*: games(address) + +function games(address game) view returns (uint256 weight) + +| Name | Description +| ---- | ----------- +| game | the contract to query about + ### **getTotalRewardPerPointWithPrecision24** The amount of reward each point has earned so far @@ -117,6 +170,16 @@ The amount of reward each point has earned so far function getTotalRewardPerPointWithPrecision24() view returns (uint256) +### **global** + +return the current global state + +*sig hash*: `0xa05f9906` + +*Signature*: global() + +function global() view returns ((uint40 lastUpdateTime, uint104 totalRewardPerPointAtLastUpdate, uint112 totalPoints)) + ### **name** Returns the name of the token. @@ -135,7 +198,7 @@ Returns the symbol of the token. *Signature*: symbol() -function symbol() view returns (string) +function symbol() pure returns (string) ### **totalSupply** @@ -167,6 +230,16 @@ Transfers `amount` tokens from address `from` to address `to`. function transferFrom(address, address, uint256) pure returns (bool) +### **update** + +update the global pool rate + +*sig hash*: `0xa2e62045` + +*Signature*: update() + +function update() + ## Events diff --git a/docs/contracts/Stratagems.md b/docs/contracts/Stratagems.md index 17cf1651..0549b0a7 100644 --- a/docs/contracts/Stratagems.md +++ b/docs/contracts/Stratagems.md @@ -450,6 +450,7 @@ event CommitmentRevealed(address indexed player, uint24 indexed epoch, bytes24 i | commitmentHash | the hash of the moves | moves | the moves | furtherMoves | hash of further moves, unless bytes32(0) which indicate end. +| newReserveAmount | new amount in reserve as a result ### **CommitmentVoid** diff --git a/docs/guide/extending-the-world/index.md b/docs/guide/extending-the-world/index.md index abb8d771..3e7c875a 100644 --- a/docs/guide/extending-the-world/index.md +++ b/docs/guide/extending-the-world/index.md @@ -18,8 +18,12 @@ Each Land have the following attributes: - `int8 delta`: whether the land is gaining life or losing life due to its neighboroud - `address owner`: the owner of land, the player who deposited a stake to choose a faction -The `producingEpochs` is particularly useful to track whether a Land has been growing since your extension kept track +The `producingEpochs` is particularly useful to track whether a Land has been growing since you can use to track it even if your game transaction happen later. This can be used for example to make a game where Land produce units as long as growth of the land is positive. -This can lead to very interesting social interaction between players of the base game and the one playing the extension game. +This can lead to very interesting social interaction between players of the base game and the one playing the extended game. + +You can of course also creating incentives mechanism to attract player of the base game. + +Stratagems has its own token: Gems, which does not have any role in the base game but is given to player whose land is propsering. Gems is thus a great token to integrate. diff --git a/web/src/lib/actions/commit/TransactionComponent.svelte b/web/src/lib/actions/commit/TransactionComponent.svelte new file mode 100644 index 00000000..891b75a3 --- /dev/null +++ b/web/src/lib/actions/commit/TransactionComponent.svelte @@ -0,0 +1,40 @@ + + +
+ This Transaction will Commit Your Moves. You can cancel (or Replace it with new Moves) before the Resolution Phase + Start. +
+ + {#if formatedValue} ++ The transaction is also sending {formatedValue} ETH so we can reveal on your behalf. This is a worst-case estimate + and unspend value can be used for further tx. +
+ {/if} + + {#if $state.fuzdData} ++ Note that we will do our best to reveal your move, but cannot guarantee it. You can always reveal yourself when + the reveal phase start. +
+ {/if} + +{currentStep.description}
+ {/if} {:else} -{currentStep.description}
+{$currentFlow.completionMessage ? $currentFlow.completionMessage : 'Steps Completed'}
{/if} - {/if} +Steps completed
- {/if} - -Please wait...
- {/if} +Please wait...
+ {/if} +