-
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.
- Loading branch information
Showing
40 changed files
with
269 additions
and
281 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,26 @@ | ||
--- | ||
"@abstract-money/cli": minor | ||
"@abstract-money/core": minor | ||
"@abstract-money/cosmwasm-utils": minor | ||
"@abstract-money/react": minor | ||
--- | ||
|
||
First release of **abstract.js** revamped SDK! | ||
|
||
New SDK structure involves multiple packages, each with its own dependencies. | ||
This allows for more flexibility and better control over the SDK. | ||
|
||
Old-new packages mapping: | ||
|
||
- `@abstract-money/abstract.js` -> `@abstract-money/core` | ||
- `@abstract-money/abstract.js-react` -> `@abstract-money/react` | ||
- `@abstract-money/cosmwasm` -> `@abstract-money/cosmwasm-utils` | ||
|
||
A new package was introduced, `@abstract-money/cli` that adopts a quicker | ||
development setup when using Abstract contracts. | ||
A developer is now not obligated to download the Abstract contract schemas himself, | ||
and can simply enumerate the required contracts via the `registry` plugin, | ||
available at `@abstract-money/cli/plugins`, and the CLI will download and cache them | ||
itself. | ||
This feature also allowed to cut out the boilerplate code from the old `@abstract-money/abstract.js`, | ||
yet keeping the backwards compatibility. |
This file was deleted.
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
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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use client' | ||
|
||
import { | ||
SigningCosmWasmClient, | ||
CosmWasmClient, | ||
|
18 changes: 0 additions & 18 deletions
18
examples/wagemos-cosmoskit-nextjs/src/app/@bets/layout.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
4 changes: 2 additions & 2 deletions
4
...extjs/src/app/@bets/_components/round.tsx → ...skit-nextjs/src/app/_components/round.tsx
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
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
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 |
---|---|---|
@@ -1,10 +1,81 @@ | ||
'use client' | ||
|
||
import { betting } from '../_generated' | ||
import { PlaceBetDialog } from './_components/place-bet-dialog' | ||
import { | ||
Round, | ||
RoundBody, | ||
RoundDescription, | ||
RoundFooter, | ||
RoundHeader, | ||
RoundId, | ||
RoundName, | ||
RoundStatus, | ||
RoundTeamMember, | ||
RoundTeams, | ||
RoundTotalBet, | ||
RoundWinningTeam, | ||
} from './_components/round' | ||
import { WalletButton } from './_components/wallet-button' | ||
|
||
export default function Home() { | ||
const { data, isLoading, isError } = betting.queries.useListRounds({ | ||
args: {}, | ||
chain: 'neutron', | ||
}) | ||
if (isLoading) return <p>Loading...</p> | ||
if (isError) return <p>Error</p> | ||
return ( | ||
<> | ||
<h1>WAGEMOS with cosmoskit</h1> | ||
<WalletButton /> | ||
<div> | ||
<h4>List of Rounds:</h4> | ||
<div className="grid row-auto gap-2 md:grid-cols-2"> | ||
{data.rounds.map((round) => { | ||
const status = | ||
typeof round.status === 'string' | ||
? { status: round.status } | ||
: ({ | ||
status: 'closed', | ||
winningTeam: round.status.closed.winning_team?.seq, | ||
} as const) | ||
return ( | ||
<Round key={round.id}> | ||
<RoundHeader> | ||
<RoundName>{round.name}</RoundName> | ||
<RoundId>ID: {round.id}</RoundId> | ||
<RoundStatus open={status.status === 'open'}> | ||
{status.status} | ||
</RoundStatus> | ||
{status.winningTeam && ( | ||
<RoundWinningTeam> | ||
Winner Account Sequence: {status.winningTeam} | ||
</RoundWinningTeam> | ||
)} | ||
</RoundHeader> | ||
<RoundBody> | ||
<RoundDescription>{round.description}</RoundDescription> | ||
<p>Team members:</p> | ||
<RoundTeams> | ||
{round.teams.map((member, i) => ( | ||
<RoundTeamMember key={i}> | ||
Account Seq: {member.seq} | ||
</RoundTeamMember> | ||
))} | ||
</RoundTeams> | ||
</RoundBody> | ||
<RoundFooter> | ||
<RoundTotalBet> | ||
Total Bet: {round.total_bet.amount} {round.total_bet.name} | ||
</RoundTotalBet> | ||
{status.status === 'open' && <PlaceBetDialog round={round} />} | ||
</RoundFooter> | ||
</Round> | ||
) | ||
})} | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.