Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge monday, merging develop into main #1144

Merged
merged 356 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
356 commits
Select commit Hold shift + click to select a range
4c0666f
Resolve bug on optional config
BalanaguYashwanth Dec 13, 2024
0c13bfe
enable image tweet on twitter
tcm390 Dec 13, 2024
25590f4
handle http url
tcm390 Dec 13, 2024
711bbc6
add content type
tcm390 Dec 13, 2024
48b6fae
feat: create README_VI.md
tqdpham96 Dec 13, 2024
95b8e77
Merge branch 'ai16z:main' into 656--fix-twitter-multi-agent-support
BalanaguYashwanth Dec 13, 2024
904cf2a
Merge branch 'develop' of https://github.com/BalanaguYashwanth/eliza …
BalanaguYashwanth Dec 13, 2024
75dd96e
Merge branch 'develop' into 656--fix-twitter-multi-agent-support
odilitime Dec 13, 2024
0fffc4a
Merge branch 'develop' into feat/client-lens
imthatcarlos Dec 13, 2024
8264094
chore(smokeTests): improve test environment validation and logging
aramxc Dec 13, 2024
593da02
Remove config
BalanaguYashwanth Dec 13, 2024
25aac50
Init mvx plugin
mgavrila Dec 5, 2024
8959826
Add wallet provider and update transfer
mgavrila Dec 5, 2024
c65791e
Update createToken
mgavrila Dec 5, 2024
4663678
Add wallet test
mgavrila Dec 5, 2024
d79680d
Update .env.example
mgavrila Dec 5, 2024
ebd671b
Rename variable
mgavrila Dec 5, 2024
fcaefa8
Apply prettier
mgavrila Dec 5, 2024
9565cbd
Remove elrond
mgavrila Dec 5, 2024
cb11d40
Remove comments
mgavrila Dec 5, 2024
ce1f81a
Rename env var
mgavrila Dec 5, 2024
e3edc7c
Rename env var
mgavrila Dec 5, 2024
5e3bb10
Revert change
mgavrila Dec 13, 2024
22d94bc
Remove line
mgavrila Dec 13, 2024
28d3705
Fix spaces
mgavrila Dec 13, 2024
b47ff06
Remove empty space
mgavrila Dec 13, 2024
f224fbf
Remove unuse config related code
BalanaguYashwanth Dec 13, 2024
f0b21a1
Merge branch 'develop' into 656--fix-twitter-multi-agent-support
BalanaguYashwanth Dec 13, 2024
7242eae
Update lockfile to match package.json
BalanaguYashwanth Dec 13, 2024
67dc5c8
chore: update pnpm lock file
aramxc Dec 13, 2024
40df2db
ReUpdate lockfile to match package.json
BalanaguYashwanth Dec 13, 2024
7cd3bf2
Merge branch 'main' into add-improved-logging-to-smokeTests
aramxc Dec 13, 2024
92316b6
fetch upstream
aramxc Dec 13, 2024
9f39f4a
revert optional dep
aramxc Dec 13, 2024
579dc50
Merge pull request #1046 from aramxc/add-improved-logging-to-smokeTests
odilitime Dec 13, 2024
3834c54
fix: add auto to clients in types to use client-auto
HashWarlock Dec 13, 2024
153d242
Merge pull request #1050 from ai16z/hash/fix-load-auto-client
odilitime Dec 13, 2024
06cbb95
home route, post /agents/:agentId/set
odilitime Dec 13, 2024
d1387e3
upload some agent functionality into directClient
odilitime Dec 13, 2024
b511c0e
remove unused SimliClientConfig, pass directClient to api, be explici…
odilitime Dec 13, 2024
230c396
fix nested numbering
lessuselesss Dec 13, 2024
bffd2f7
fix: discord client ci issues
cygaar Dec 13, 2024
747b5c2
Merge pull request #1052 from odilitime/rest-upgrade
monilpat Dec 13, 2024
ff9eb67
Merge branch 'develop' into fix_discord_ci
monilpat Dec 13, 2024
60fe254
Fix lockfiles
jzvikart Dec 13, 2024
970410d
Merge pull request #1054 from cygaar/fix_discord_ci
monilpat Dec 13, 2024
b9a903a
Fix pnpm-lock
jzvikart Dec 13, 2024
298ad05
Merge branch 'develop' into telegram-team-feature
azep-ninja Dec 13, 2024
bf60b96
Merge pull request #1055 from Sifchain/fix/fix-pnpm-lock-issues
monilpat Dec 13, 2024
fa9250b
lens client posts and interactions
imthatcarlos Dec 13, 2024
3cf78bc
chore: improve eslint by --cache
shengxj1 Dec 14, 2024
6d68ae5
Merge branch 'develop' into discord-telegram-team-agents-and-optimiza…
azep-ninja Dec 14, 2024
b350f3c
Merge pull request #1040 from ai16z/tcm-twitter-image
monilpat Dec 14, 2024
7ad8141
Merge pull request #1033 from azep-ninja/telegram-team-feature
monilpat Dec 14, 2024
5ec8635
add venice key to image plugin
proteanx Dec 13, 2024
e6144ff
add venice image api option+default
proteanx Dec 13, 2024
f801493
load image plugin if venice key is found
proteanx Dec 13, 2024
c425ec8
add venice image generator
proteanx Dec 14, 2024
072e11b
Merge pull request #1057 from proteanx/veniceimage
monilpat Dec 14, 2024
9667ece
Merge branch 'develop' into main
monilpat Dec 14, 2024
1a7b788
Merge branch 'develop' of https://github.com/BalanaguYashwanth/eliza …
BalanaguYashwanth Dec 14, 2024
b7bf5c1
add plugin-sui
jnaulty Dec 9, 2024
79cc49f
chore: add translations link in main README.md for docs directory
derRizzMeister Dec 14, 2024
f31b594
Fixed `Unescape newlines` in twitter package
Titan-Node Dec 14, 2024
bc13351
Merge pull request #856 from arslanaybars/fix/twitter-login-cookie-ch…
lalalune Dec 14, 2024
d84e902
Merge branch 'main' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
96d572b
Merge branch 'develop' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
141b03b
Merge branch 'develop' into main
tqdpham96 Dec 14, 2024
9bd1c58
Merge pull request #1058 from tqdpham96/main
lalalune Dec 14, 2024
c20341e
Merge branch 'develop' into update_docs
lalalune Dec 14, 2024
924e171
Merge pull request #1053 from lessuselesss/update_docs
lalalune Dec 14, 2024
22d5c55
Merge pull request #1034 from derRizzMeister/main
lalalune Dec 14, 2024
6606373
Merge branch 'feature/multivesrx-plugin' of https://github.com/mgavri…
lalalune Dec 14, 2024
c20030f
fix generate object ref
lalalune Dec 14, 2024
2f0519c
Merge branch 'main' of https://github.com/serrrfirat/eliza into HEAD
lalalune Dec 14, 2024
2cdbc67
update to new api
lalalune Dec 14, 2024
7af10f1
rename generateObjectV2 to generateObject
lalalune Dec 14, 2024
7be712e
remove extraneous deps
lalalune Dec 14, 2024
451ca90
add plugin direct to agent deps
lalalune Dec 14, 2024
b8966cf
chore: commented out unused variables
shakkernerd Dec 14, 2024
a8aa112
Merge branch 'add_zksync_era_support' of https://github.com/arose00/e…
lalalune Dec 14, 2024
50498fb
Merge pull request #1073 from ai16z/fix/swap_solana
shakkernerd Dec 14, 2024
995507f
fix: incorrect eslint config file path
shakkernerd Dec 14, 2024
56495f7
Merge pull request #1074 from ai16z/fix/plugin-multiversx
shakkernerd Dec 14, 2024
6a7da24
remove terminal chat
lalalune Dec 14, 2024
7137194
Merge branch 'develop' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
91d26a1
Merge branch 'develop' of https://github.com/PumpChat-AI/eliza into d…
lalalune Dec 14, 2024
a0d4033
fix: remove unnecessary devDependencies
shakkernerd Dec 14, 2024
1e430d5
Merge pull request #1075 from ai16z/fix/plugin-multiversx
shakkernerd Dec 14, 2024
d022c78
Merge branch 'add-slack-plugin' of https://github.com/AIFlowML/eliza_…
lalalune Dec 14, 2024
bfd19a0
Merge pull request #1031 from Freytes/patch-3
lalalune Dec 14, 2024
54a364a
Merge pull request #1056 from shengxj1/chore/eslint-cache
lalalune Dec 14, 2024
5258c23
fix: missing eslint config file
shakkernerd Dec 14, 2024
4a3d462
Merge pull request #1076 from ai16z/fix/plugin-near
shakkernerd Dec 14, 2024
dd7eee3
fix: remove unnecessary devDependencies
shakkernerd Dec 14, 2024
215ab1d
Merge pull request #1077 from ai16z/fix/plugin-near
shakkernerd Dec 14, 2024
2419c54
Fix generateObject ref
lalalune Dec 14, 2024
40e1a2b
Merge branch 'develop' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
ed52703
fix: use of let instead of const
shakkernerd Dec 14, 2024
9052409
fix: remove unused variables in swap action
shakkernerd Dec 14, 2024
9ee1b86
Merge pull request #1078 from ai16z/fix/plugin-near
shakkernerd Dec 14, 2024
9cf0389
chore: commented out unused yoctoAmount variable
shakkernerd Dec 14, 2024
6acc78f
chore: renamed runtime and message variables to fix lint errors
shakkernerd Dec 14, 2024
26455ef
chore: commented out unused import
shakkernerd Dec 14, 2024
dc93bf6
Merge pull request #1079 from ai16z/fix/plugin-near
shakkernerd Dec 14, 2024
ae9b5b3
chore: add npmignore file
shakkernerd Dec 14, 2024
6798a89
Merge pull request #1080 from ai16z/fix/plugin-near
shakkernerd Dec 14, 2024
0374a49
chore: fix broken pnpm lockfile
shakkernerd Dec 14, 2024
4f2567e
Merge pull request #1081 from ai16z/fix/pnpm-lockfile
shakkernerd Dec 14, 2024
bcd4c02
fix: eslint command
shakkernerd Dec 14, 2024
4bc6ed7
Merge pull request #1082 from ai16z/fix/client-slack
shakkernerd Dec 14, 2024
689f936
chore: remove unnecessary packages
shakkernerd Dec 14, 2024
f58cfbc
Merge pull request #1083 from ai16z/fix/client-slack
shakkernerd Dec 14, 2024
53a39c7
fix: rename state variable
shakkernerd Dec 14, 2024
3961a10
fix: rename state variable
shakkernerd Dec 14, 2024
10389af
chore: remove unused imports
shakkernerd Dec 14, 2024
726dac4
fix: rename state variable
shakkernerd Dec 14, 2024
e8ea5db
chore: remove unused imports
shakkernerd Dec 14, 2024
d5c8b43
fix: dynamic import of fs module
shakkernerd Dec 14, 2024
8a2dc3e
Merge pull request #1084 from ai16z/fix/client-slack
shakkernerd Dec 14, 2024
558a61b
chore: remove unused imports and rename runtime variable
shakkernerd Dec 14, 2024
7acabc0
Merge pull request #1085 from ai16z/fix/client-slack
shakkernerd Dec 14, 2024
b20e9fa
chore: delete unnecessary file
shakkernerd Dec 14, 2024
a2611a9
fix: remove unused import variables
shakkernerd Dec 14, 2024
b246364
fix: log error to the console
shakkernerd Dec 14, 2024
81837ba
chore: pnpm lockfile
shakkernerd Dec 14, 2024
c85ae4a
Merge pull request #1086 from ai16z/fix/client-slack
shakkernerd Dec 14, 2024
7b480d5
fix: syntax error: invalid arithmetic operator
shakkernerd Dec 14, 2024
49ed796
fix: invalid arithmetic operator
shakkernerd Dec 14, 2024
592287d
feat: allow users to configure models for grok
oxSaturn Dec 14, 2024
fa685bb
Merge pull request #1088 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
5d8f7cd
chore: increase timeout to 3mins
shakkernerd Dec 14, 2024
bf6d671
Merge pull request #1092 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
750ec02
chore: kill pnpm start
shakkernerd Dec 14, 2024
cbdb7b7
Merge pull request #1093 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
9a0f5fe
chore: debugging start behaviour
shakkernerd Dec 14, 2024
aa5f641
docs: add readme to plugin-evm
nicky-ru Dec 14, 2024
5ba7384
Merge pull request #1094 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
d90474d
Merge branch 'develop' into feat/client-lens
imthatcarlos Dec 14, 2024
dc29985
fix: return types of createAgent & startAgent
BlockJuic3 Dec 14, 2024
a48d0fa
Merge pull request #1095 from nicky-ru/docs-plugin-evm-readme
shakkernerd Dec 14, 2024
9325eb3
Merge branch 'develop' into feat/add_plugin-nft-generator
xwxtwd Dec 14, 2024
72ea07b
Merge branch 'develop' into discord-telegram-team-agents-and-optimiza…
azep-ninja Dec 14, 2024
c881962
Merge branch 'develop' into fix/agent-functions-return-typ
monilpat Dec 14, 2024
e3d6feb
Merge pull request #1097 from BlockJuic3/fix/agent-functions-return-typ
monilpat Dec 14, 2024
2b73a37
Merge branch 'main' into main
monilpat Dec 14, 2024
727e6e5
add bankless and twitter space notes
madjin Dec 14, 2024
5ffbd4d
feat: Smoke Test script
shakkernerd Dec 14, 2024
82b475f
Merge pull request #1101 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
dadaae3
Merge pull request #1091 from oxSaturn/feat/configure-models-grok-2
monilpat Dec 14, 2024
ea1ef58
Merge pull request #998 from ai16z-demirix/main
odilitime Dec 14, 2024
6d3253f
Merge branch 'develop' into discord-telegram-team-agents-and-optimiza…
azep-ninja Dec 14, 2024
6cab7ef
Merge branch 'develop' of https://github.com/BalanaguYashwanth/eliza …
BalanaguYashwanth Dec 14, 2024
c64b95d
Merge pull request #1036 from BalanaguYashwanth/656--fix-twitter-mult…
odilitime Dec 14, 2024
151ab67
fix: handle no termination mesage
shakkernerd Dec 14, 2024
40a2232
Merge pull request #1102 from ai16z/fix/smokeTests
shakkernerd Dec 14, 2024
5df5c9d
chore: fix broken pnpm lockfile
shakkernerd Dec 14, 2024
86a34e0
Merge pull request #1103 from ai16z/fix/pnpm-lockfile
shakkernerd Dec 14, 2024
dd6a410
Merge pull request #1070 from Titan-Node/main
monilpat Dec 14, 2024
770cbb6
fix: add missing imports
shakkernerd Dec 14, 2024
fbbc3c3
Merge pull request #1104 from ai16z/fix/starting_agent
monilpat Dec 14, 2024
4f1621b
Merge branch 'main' into patch-1
lalalune Dec 14, 2024
f6a56d7
Merge branch 'develop' into patch-1
lalalune Dec 14, 2024
6425845
Merge pull request #897 from guzus/patch-1
lalalune Dec 14, 2024
ee4db04
fix missing
lalalune Dec 14, 2024
7b98b5d
Merge branch 'develop' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
7a12096
Merge branch 'feat/client-lens' of https://github.com/mad-finance/eli…
lalalune Dec 14, 2024
0ca14a3
Merge pull request #1011 from xwxtwd/feat/add_plugin-nft-generator
lalalune Dec 14, 2024
ab60f15
Fix title levels in plugins docs
brunocalmels Dec 14, 2024
dbfceaa
commit lock
lalalune Dec 14, 2024
9c84799
Fix typo
brunocalmels Dec 14, 2024
dc7d73c
Merge pull request #1107 from brunocalmels/patch-1
lalalune Dec 14, 2024
8f767c1
Merge branch 'jnaulty/add-sui-plugin' of https://github.com/jnaulty/e…
lalalune Dec 14, 2024
f45dfb5
Merge branch 'develop' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
44da564
Merge branch 'plugin-story' of https://github.com/storyprotocol/eliza…
lalalune Dec 14, 2024
1cfe4ce
fix build
lalalune Dec 14, 2024
aa2cf4b
Merge branch 'fix/charity' of http://github.com/ai16z/eliza into develop
lalalune Dec 14, 2024
8365087
update community docs
madjin Dec 15, 2024
7b2638a
merge with develop
madjin Dec 15, 2024
06cc88a
Merge pull request #1111 from ai16z/new_docs
monilpat Dec 15, 2024
38267d3
Revert "Feat: Update community section of docs"
monilpat Dec 15, 2024
e7a467a
Merge pull request #1112 from ai16z/revert-1111-new_docs
madjin Dec 15, 2024
c4eeddf
update docs
madjin Dec 15, 2024
5595a84
update api docs, add dotenv module
madjin Dec 15, 2024
171b625
add profiles page
madjin Dec 15, 2024
fc05d28
Merge branch 'develop' of github.com:ai16z/eliza into new_docs
madjin Dec 15, 2024
1ccc6d0
update docs
madjin Dec 15, 2024
8ae6d10
Merge pull request #1114 from ai16z/new_docs
monilpat Dec 15, 2024
fd277ec
chore: fix broken pnpm lockfile
shakkernerd Dec 15, 2024
7288fd0
Merge pull request #1115 from ai16z/fix/pnpm-lockfile
shakkernerd Dec 15, 2024
026caf7
Merge pull request #837 from qgpcybs/main
lalalune Dec 15, 2024
90a54d2
use large models
lalalune Dec 15, 2024
b841009
Merge branch 'develop' of http://github.com/ai16z/eliza into HEAD
lalalune Dec 15, 2024
9ac6f3b
Merge pull request #957 from azep-ninja/discord-telegram-team-agents-…
lalalune Dec 15, 2024
a49923f
Merge branch 'develop' into 813-disable-fal-safety-checker
lalalune Dec 15, 2024
33931e3
Merge pull request #814 from daojonesceo/813-disable-fal-safety-checker
lalalune Dec 15, 2024
d5ea1d5
fix: prevent pnpm lock file from incorrectly being updated on install…
monilpat Dec 15, 2024
a09058d
remove -r
monilpat Dec 15, 2024
eff83ec
on default don't update pnpm lockfile
monilpat Dec 15, 2024
5f0b1ca
remove space
monilpat Dec 15, 2024
2afc621
don't need to explicitly set it with .npmrc in root file
monilpat Dec 15, 2024
d381a57
remove space
monilpat Dec 15, 2024
39b7394
Update quickstart.md
monilpat Dec 15, 2024
1c7be54
add 2 new chars
0xCardinalError Dec 15, 2024
42915e6
remove adding new chars
0xCardinalError Dec 15, 2024
6e6c93c
add missing params
0xCardinalError Dec 15, 2024
0167165
give proper voice
0xCardinalError Dec 15, 2024
c596959
discord fix - duplicate function
azep-ninja Dec 16, 2024
969812e
Merge pull request #1124 from n00b21337/add_example_chars
lalalune Dec 16, 2024
3085635
Merge pull request #1125 from azep-ninja/fix/discord-duplicats-fix
monilpat Dec 16, 2024
551025e
Merge branch 'develop' into realitySpiral/lockFileFix
monilpat Dec 16, 2024
1621048
Merge pull request #1120 from Sifchain/realitySpiral/lockFileFix
monilpat Dec 16, 2024
de87bfa
add chatapi by akash network to model configs
MbBrainz Dec 16, 2024
aea64d4
Merge branch 'main' of http://github.com/ai16z/eliza into develop
lalalune Dec 16, 2024
a920af9
fix name
0xCardinalError Dec 16, 2024
6ecd894
add new file name
0xCardinalError Dec 16, 2024
9ac30b1
Merge branch 'develop' into main
MbBrainz Dec 16, 2024
a0c49d8
Merge pull request #1133 from n00b21337/fix/add_example_chars
monilpat Dec 16, 2024
d0ea220
Merge pull request #1131 from MbBrainz/main
monilpat Dec 16, 2024
6453e62
added FOMO createToken action in plugin-solana
Dec 16, 2024
fe71a15
feat: add support for handlebars templating engine as an option
Dec 16, 2024
bb5c4a3
feat: document advanced usage in md file
Dec 16, 2024
4b98e2b
feat: after CR, removing long example
Dec 16, 2024
9348c97
Merge pull request #1136 from erise133/feat/handlebars-templating-engine
monilpat Dec 16, 2024
1815030
remove docker compose command since Docker file already runs
rarepepi Dec 16, 2024
f2217ef
fix tg duplicate functions.
azep-ninja Dec 16, 2024
db9580d
clean newlines for new tweet
owlcode Dec 16, 2024
105025a
Merge pull request #1141 from owlcode/clean-newlines-from-new-tweets
monilpat Dec 16, 2024
d2c1d93
Merge branch 'develop' into fix/plugin-evm
odilitime Dec 16, 2024
7d6d121
Merge pull request #1140 from azep-ninja/fix/duplicate-tg-funtions
monilpat Dec 16, 2024
2263d76
fix merge: remove double improve, adjust params to various calls, use…
odilitime Dec 16, 2024
ca5edca
Merge pull request #965 from FWangZil/fix/plugin-evm
odilitime Dec 16, 2024
c4d4a0a
Merge pull request #1135 from fomoTon/fomo-token-plugin
odilitime Dec 17, 2024
2e9bcbe
update lockfile for PR1135
odilitime Dec 17, 2024
fa87841
chore: remove comment
shakkernerd Dec 17, 2024
2d56171
Merge pull request #1143 from ai16z/remove-comment
shakkernerd Dec 17, 2024
3066584
fix: remove unused import
shakkernerd Dec 17, 2024
257d3e4
fix: Expected an assignment or function call and instead saw an expre…
shakkernerd Dec 17, 2024
06a1b00
fix: use of let instead of const
shakkernerd Dec 17, 2024
c56f60c
chore: comment out unused imports
shakkernerd Dec 17, 2024
90be9ec
fix: remove unused variable
shakkernerd Dec 17, 2024
018f952
chore: lint command
shakkernerd Dec 17, 2024
5fcdcff
chore: add eslint config
shakkernerd Dec 17, 2024
83bd487
chore: delete client-whatsapp folder
shakkernerd Dec 17, 2024
284f38a
Merge pull request #1139 from rarepepi/docker-fixes
monilpat Dec 17, 2024
dac55c5
improve on fomo plugin and distingush it from pump.fun's plugin
odilitime Dec 17, 2024
0e337c3
Merge pull request #1147 from odilitime/fix-lint
shakkernerd Dec 17, 2024
b6af59e
include fomo
odilitime Dec 17, 2024
8a8b69f
update URLs and example response
odilitime Dec 17, 2024
0a23d6d
Merge pull request #1148 from odilitime/fix-lint
shakkernerd Dec 17, 2024
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
Prev Previous commit
Next Next commit
Update createToken
  • Loading branch information
mgavrila committed Dec 13, 2024
commit c65791e9c849fd2ce09c82e891ba80f349266a7b
1 change: 1 addition & 0 deletions packages/plugin-multiversx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dependencies": {
"@ai16z/eliza": "workspace:*",
"@multiversx/sdk-core": "13.15.0",
"bignumber.js": "9.1.2",
"browserify": "^17.0.1",
"esbuild-plugin-polyfill-node": "^0.3.0",
"esmify": "^2.1.1",
Expand Down
111 changes: 30 additions & 81 deletions packages/plugin-multiversx/src/actions/createToken.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import {
UserWallet,
UserSigner,
ApiNetworkProvider,
UserSecretKey,
TransactionsFactoryConfig,
TokenManagementTransactionsFactory,
Address,
TransactionComputer,
} from "@multiversx/sdk-core";
import {
elizaLogger,
ActionExample,
Expand All @@ -21,6 +11,8 @@ import {
composeContext,
type Action,
} from "@ai16z/eliza";
import { WalletProvider } from "../providers/wallet";
import { validateMultiversxConfig } from "../enviroment";

export interface CreateTokenContent extends Content {
tokenName: string;
Expand All @@ -29,17 +21,12 @@ export interface CreateTokenContent extends Content {
amount: string;
}

function isTransferContent(
function isCreateTokenContent(
runtime: IAgentRuntime,
content: any
): content is CreateTokenContent {
console.log("Content for create token", content);
return (
content.tokenName &&
content.tokenTicker &&
content.decimals &&
content.amount
);
return content.tokenName && content.tokenTicker && content.amount;
}

const createTokenTemplate = `Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined.
Expand Down Expand Up @@ -68,24 +55,8 @@ export default {
name: "CREATE_TOKEN",
similes: ["DEPLOY_TOKEN"],
validate: async (runtime: IAgentRuntime, message: Memory) => {
console.log("Starting new token creation from user:", message.userId);
//add custom validate logic here
/*
const adminIds = runtime.getSetting("ADMIN_USER_IDS")?.split(",") || [];
//console.log("Admin IDs from settings:", adminIds);

const isAdmin = adminIds.includes(message.userId);

if (isAdmin) {
//console.log(`Authorized transfer from user: ${message.userId}`);
return true;
}
else
{
//console.log(`Unauthorized transfer attempt from user: ${message.userId}`);
return false;
}
*/
console.log("Validating config for user:", message.userId);
await validateMultiversxConfig(runtime);
return true;
},
description: "Create a new token.",
Expand Down Expand Up @@ -119,7 +90,7 @@ export default {
});

// Validate transfer content
if (!isTransferContent(runtime, content)) {
if (!isCreateTokenContent(runtime, content)) {
console.error("Invalid content for TRANSFER_TOKEN action.");
if (callback) {
callback({
Expand All @@ -131,54 +102,17 @@ export default {
}

try {
const password = runtime.getSetting("MVX_WALLET_PASSWORD");
const secretKeyHex = runtime.getSetting("MVX_WALLET_SECRET_KEY");

const secretKey = UserSecretKey.fromString(secretKeyHex);

const signer = new UserSigner(secretKey);
const address = signer.getAddress();
const privateKey = runtime.getSetting("MVX_WALLET_SECRET_KEY");
const network = runtime.getSetting("MVX_NETWORK");

const apiNetworkProvider = new ApiNetworkProvider(
"https://devnet-api.multiversx.com",
{ clientName: "eliza-mvx" }
);
const walletProvider = new WalletProvider(privateKey, network);

const factoryConfig = new TransactionsFactoryConfig({
chainID: "D",
});
const factory = new TokenManagementTransactionsFactory({
config: factoryConfig,
});

const decimals = parseInt(content.decimals);
const amount =
Number(content.amount) * 10 ** Number(content.decimals);

const account = await apiNetworkProvider.getAccount(address);

const transaction = factory.createTransactionForIssuingFungible({
sender: new Address(address),
await walletProvider.createESDT({
tokenName: content.tokenName,
tokenTicker: content.tokenTicker.toUpperCase(),
initialSupply: BigInt(amount),
numDecimals: BigInt(decimals),
canFreeze: false,
canWipe: false,
canPause: false,
canChangeOwner: false,
canUpgrade: false,
canAddSpecialRoles: false,
amount: content.amount,
decimals: Number(content.decimals) || 18,
tokenTicker: content.tokenTicker,
});

const computer = new TransactionComputer();
transaction.nonce = BigInt(account.nonce);
const serializedTx = computer.computeBytesForSigning(transaction);
transaction.signature = await signer.sign(serializedTx);

const txHash =
await apiNetworkProvider.sendTransaction(transaction);
console.log("TxHash", txHash);
return true;
} catch (error) {
console.error("Error during creating token:", error);
Expand All @@ -197,7 +131,22 @@ export default {
{
user: "{{user1}}",
content: {
text: "Create a token called TEST with ticker TST, 18 decimals and amount of 10000",
text: "Create a token XTREME with ticker XTR and supply of 10000",
action: "CREATE_TOKEN",
},
},
{
user: "{{user2}}",
content: {
text: "Succesfully created token.",
},
},
],
[
{
user: "{{user1}}",
content: {
text: "Create a token TEST with ticker TST, 18 decimals and su of 10000",
action: "CREATE_TOKEN",
},
},
Expand Down
104 changes: 91 additions & 13 deletions packages/plugin-multiversx/src/providers/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
TransactionsFactoryConfig,
Token,
Transaction,
TokenManagementTransactionsFactory,
} from "@multiversx/sdk-core";
import { denominateAmount } from "../utils/amount";

Expand All @@ -19,14 +20,18 @@ const MVX_NETWORK = {
mainnet: {
chainID: "1", // Mainnet chain ID
apiURL: "https://api.multiversx.com", // Mainnet API URL
explorerURL: "https://explorer.multiversx.com"
},
devnet: {
chainID: "D", // Devnet chain ID
apiURL: "https://devnet-api.multiversx.com", // Devnet API URL
apiURL: "https://devnet-api.multiversx.com", // Devnet API URL,
explorerURL: "https://devnet-explorer.multiversx.com"

},
testnet: {
chainID: "T", // Testnet chain ID
apiURL: "https://testnet-api.multiversx.com", // Testnet API URL
explorerURL: "https://testnet-explorer.multiversx.com"
},
};

Expand All @@ -35,6 +40,7 @@ export class WalletProvider {
private signer: UserSigner; // Handles cryptographic signing
private apiNetworkProvider: ApiNetworkProvider; // Interacts with the MultiversX network
private chainID: string; // Current network chain ID
private explorerURL: string; // Current network explorer URL

/**
* Constructor to initialize WalletProvider with a private key and network configuration
Expand All @@ -48,6 +54,7 @@ export class WalletProvider {

const networkConfig = MVX_NETWORK[network];
this.chainID = networkConfig.chainID;
this.explorerURL = networkConfig.explorerURL;

// Initialize the signer with the user's private key
const secretKey = UserSecretKey.fromString(privateKey);
Expand Down Expand Up @@ -77,6 +84,18 @@ export class WalletProvider {
return account.balance.toString(); // Return balance as a string
}

/**
* Sign a transaction using the wallet's private key
* @param transaction - The transaction object to sign
* @returns The transaction signature as a string
*/
public async signTransaction(transaction: Transaction) {
const computer = new TransactionComputer();
const serializedTx = computer.computeBytesForSigning(transaction); // Prepare transaction for signing
const signature = await this.signer.sign(serializedTx); // Sign the transaction
return signature;
}

/**
* Send EGLD tokens to another wallet
* @param receiverAddress - Recipient's wallet address
Expand Down Expand Up @@ -126,6 +145,7 @@ export class WalletProvider {
await this.apiNetworkProvider.sendTransaction(transaction);

elizaLogger.log(`TxHash: ${txHash}`); // Log transaction hash
elizaLogger.log(`Transaction URL: ${this.explorerURL}/transactions/${txHash}`); // View Transaction
return txHash;
} catch (error) {
console.error("Error sending EGLD transaction:", error);
Expand All @@ -135,18 +155,6 @@ export class WalletProvider {
}
}

/**
* Sign a transaction using the wallet's private key
* @param transaction - The transaction object to sign
* @returns The transaction signature as a string
*/
public async signTransaction(transaction: Transaction) {
const computer = new TransactionComputer();
const serializedTx = computer.computeBytesForSigning(transaction); // Prepare transaction for signing
const signature = await this.signer.sign(serializedTx); // Sign the transaction
return signature;
}

/**
* Send ESDT (eStandard Digital Token) tokens to another wallet
* @param receiverAddress - Recipient's wallet address
Expand Down Expand Up @@ -208,6 +216,7 @@ export class WalletProvider {
await this.apiNetworkProvider.sendTransaction(transaction);

elizaLogger.log(`TxHash: ${txHash}`); // Log transaction hash
elizaLogger.log(`Transaction URL: ${this.explorerURL}/transactions/${txHash}`); // View Transaction
return txHash;
} catch (error) {
console.error("Error sending ESDT transaction:", error);
Expand All @@ -216,4 +225,73 @@ export class WalletProvider {
);
}
}

/**
* Create a new Elrond Standard Digital Token (ESDT).
* @param tokenName - The name of the token to be created.
* @param tokenTicker - The ticker symbol for the token.
* @param amount - The initial supply of the token.
* @param decimals - The number of decimal places for the token.
* @returns The transaction hash of the created ESDT.
*/
public async createESDT({
tokenName,
tokenTicker,
amount,
decimals,
}: {
tokenName: string;
tokenTicker: string;
amount: string;
decimals: number;
}): Promise<string> {
try {
const address = this.getAddress(); // Retrieve the sender's address

const factoryConfig = new TransactionsFactoryConfig({
chainID: this.chainID, // Set the chain ID for the transaction factory
});
const factory = new TokenManagementTransactionsFactory({
config: factoryConfig, // Initialize the factory with the configuration
});

const totalSupply = denominateAmount({ amount, decimals });

// Create a transaction for issuing a fungible token
const transaction = factory.createTransactionForIssuingFungible({
sender: new Address(address), // Specify the sender's address
tokenName, // Name of the token
tokenTicker: tokenTicker.toUpperCase(), // Token ticker in uppercase
initialSupply: BigInt(totalSupply), // Initial supply as a BigInt
numDecimals: BigInt(decimals), // Number of decimals as a BigInt
canFreeze: false, // Token cannot be frozen
canWipe: false, // Token cannot be wiped
canPause: false, // Token cannot be paused
canChangeOwner: true, // Ownership can be changed
canUpgrade: true, // Token can be upgraded
canAddSpecialRoles: true, // Special roles can be added
});

// Fetch the account details to set the nonce
const account = await this.apiNetworkProvider.getAccount(address);
transaction.nonce = BigInt(account.nonce); // Set the nonce for the transaction

const signature = await this.signTransaction(transaction); // Sign the transaction
transaction.signature = signature; // Attach the signature to the transaction

// Send the transaction to the network and get the transaction hash
const txHash =
await this.apiNetworkProvider.sendTransaction(transaction);

elizaLogger.log(`TxHash: ${txHash}`); // Log the transaction hash
elizaLogger.log(`Transaction URL: ${this.explorerURL}/transactions/${txHash}`); // View Transaction

return txHash; // Return the transaction hash
} catch (error) {
console.error("Error creating ESDT:", error);
throw new Error(
`Failed to create ESDT: ${error.message || "Unknown error"}`
); // Throw an error if creation fails
}
}
}